开发者

Test results and code coverage status on LCD Screen

HI,

We are a small TDD team. We have a LCD screen mounted on the wall which we would like to have display the status of our builds together with current code coverage.

Are there any tool开发者_如何转开发s that will provide this out ot the box? If not is this pretty straight forward to develop on our own?

We are using TFS 2008.

Cheers!


At the end of a build

  • we aggregate all relevant information
  • we insert this information into an SQL Server table

Viewing the results

To view the results we have created a simple Excel file.

  • In Excel we get the latest 100 results from the BuildServer table. Here we have opted to have this query refresh itself every 30 minutes (checkbox when creating the query).
  • We've created a pivot graph on this data showing the results of the build.
  • To get the pivot graphs automatically refresh when the query is refreshed, we've used a vba script.

In a nutshell, that's about it. Open the Excel file on the computer connected to your LCD and the results get refreshed every 30 minutes.

Scripts

Aggregating and inserting is done with following batchfile.

FOR /F "tokens=3 delims=:" %%A in ('FIND /c "Fatal:" "%Temp%\Build.txt"') DO SET FatalErrors=%%A
FOR /F "tokens=3 delims=:" %%A in ('FIND /c "Error:" "%Temp%\Build.txt"') DO SET Errors=%%A
FOR /F "tokens=3 delims=:" %%A in ('FIND /c "Warning:" "%Temp%\Build.txt"') DO SET Warnings=%%A
FOR /F "tokens=3 delims=:" %%A in ('FIND /c "Hint:" "%Temp%\Build.txt"') DO SET Hints=%%A
FOR /F "tokens=3 delims=:" %%A in ('FIND /c "  at " "%Temp%\TestRun.txt"') DO SET TestFailures=%%A
sqlcmd -S<YourServer> -d<YourDatabase> -U<UserName> -P<Password> -Q"INSERT INTO dbo.BuildServer (Initials, CreatedOn, FatalErrors, Errors, Warnings, Hints, TestFailures) VALUES ('%Initialen%', GETDATE(), %FatalErrors%, %Errors%, %Warnings%, %Hints%, %TestFailures%)"

Vba script to refresh all Pivot tables

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim pt As PivotTable
    Dim ws As Worksheet

    For Each ws In Application.Worksheets
        For Each pt In ws.PivotTables
            pt.RefreshTable
        Next pt
    Next ws

End Sub


You can use a continuous integration server that gives you all these data. (status of your builds together with current code coverage), and some other metrics.

IMO the best one right now is Hudson

Another good one is Cruise Control


See e.g. here: http://hamang.net/2006/03/09/updated-continuous-integration-using-an-lcd-tv/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜