Skip to content

Commit 81d80de

Browse files
committed
updates for new release
1 parent 766c5c9 commit 81d80de

File tree

4 files changed

+39
-32
lines changed

4 files changed

+39
-32
lines changed

.testspace.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
[![Testspace](http://www.testspace.com/img/Testspace.png)](http://www.testspace.com)
1+
[![Testspace](https://www.testspace.com/img/Testspace.png)](http://www.testspace.com)
22

33
***
44

55
## C#/NUnit sample for demonstrating Testspace
66

77
This sample demonstrates techniques for using Testspace with C# code and the [NUnit](http://nunit.org/) test framework, along with the [OpenCover](https://github.com/OpenCover/opencover) coverage tool and [Visual Studio's](https://msdn.microsoft.com/en-us/library/dd264939.aspx) static analysis tool using [NUnit's C# examples](https://github.com/nunit/nunit-csharp-samples).
88

9+
* Using a Testspace Project that is `connected` with this GitHub Repo
10+
* Using 1 Online CI services for demonstration purposes only
11+
* Can review the Results at [testspace-samples:csharp.nunit](https://samples.testspace.com/projects/testspace-samples:charp.nunit)
12+
* Refer to our [Getting Started](https://help.testspace.com/getting-started) help articles for more information
13+
914
***
1015
Using CI Services:
1116

@@ -14,16 +19,23 @@ Using CI Services:
1419
***
1520
Publishing **Test Content** using www.testspace.com.
1621

17-
[![Space Health](https://samples.testspace.com/spaces/822/badge)](https://samples.testspace.com/spaces/822 "Test Cases")
18-
[![Space Metric](https://samples.testspace.com/spaces/822/metrics/805/badge)](https://samples.testspace.com/spaces/822/schema/Code%20Coverage "Code Coverage (branches)")
19-
[![Space Metric](https://samples.testspace.com/spaces/822/metrics/806/badge)](https://samples.testspace.com/spaces/822/schema/Code%20Coverage "Code Coverage (methods)")
20-
[![Space Metric](https://samples.testspace.com/spaces/822/metrics/807/badge)](https://samples.testspace.com/spaces/822/schema/Code%20Coverage "Code Coverage (sequences)")
21-
[![Space Metric](https://samples.testspace.com/spaces/822/metrics/808/badge)](https://samples.testspace.com/spaces/822/schema/Static%20Analysis "Static Analysis (issues)")
22+
[![Space Health](https://samples.testspace.com/spaces/822/badge?token=f69d3020d64d4e67db7983e06dfa58e40dad78b6)](https://samples.testspace.com/spaces/822 "Test Cases")
23+
[![Space Metric](https://samples.testspace.com/spaces/822/metrics/807/badge?token=d1a8f3d6ac33fcf16b7551db665eef0fbb28d328)](https://samples.testspace.com/spaces/822/schema/Code%20Coverage "Code Coverage (sequences)")
24+
[![Space Metric](https://samples.testspace.com/spaces/822/metrics/808/badge?token=91f58b9b056beadd479ccf587fcdf83046cba695)](https://samples.testspace.com/spaces/822/schema/Static%20Analysis "Static Analysis (issues)")
2225

2326
***
2427

2528
In order to run this sample you will need a host workstation with Visual Studio, the [Nunit](http://nunit.org/) test framework and the [OpenCover](https://github.com/OpenCover/opencover) coverage tool.
2629

30+
Download and configure the Testspace client
31+
32+
<pre>
33+
appveyor DownloadFile https://testspace-client.s3.amazonaws.com/testspace-windows.zip
34+
7z x -y testspace-windows.zip
35+
testspace config url samples.testspace.com
36+
</pre>
37+
38+
2739
Building with static analysis:
2840

2941
<pre>
@@ -35,19 +47,9 @@ Running tests with code coverage:
3547
OpenCover.Console -target:"nunit3-console.exe" -targetargs:"cs-money.dll" -output:"coverage.xml" -filter:"+[*]* -[*]*MoneyTest*" -register:user
3648
</pre>
3749

38-
Pushing Content using **Testspace client**:
50+
Push Content using Testspace client
3951

4052
<pre>
41-
curl -fsS -o testspace-windows.zip https://testspace-client.s3.amazonaws.com/testspace-windows.zip
42-
7z x -y .\testspace-windows.zip
43-
testspace @.testspace.txt %TESTSPACE_TOKEN%/%APPVEYOR_REPO_NAME:/=:%/%APPVEYOR_REPO_BRANCH%#appveyor.build.%APPVEYOR_BUILD_NUMBER%
44-
</pre>
45-
46-
Checkout the published [Testspace Content](https://samples.testspace.com/projects/csharp.nunit). Note that the `.testspace.txt` file contains the [set of files](http://help.testspace.com/how-to:publish-content#publishing-via-content-list-file) to publish.
53+
testspace analysis.xml [Tests]TestResult.xml coverage.xml
54+
</pre>
4755

48-
To replicate this sample:
49-
- Setup account at www.testspace.com.
50-
- Create a Environment variable called `TESTSPACE_TOKEN`
51-
- `TESTSPACE_TOKEN` = `credentials@Your-Org-Name.testspace.com`
52-
- `credentials` set to `username:password` or your [access token](http://help.testspace.com/reference:client-reference#login-credentials)
53-
- To [use Testspace with a CI system](http://help.testspace.com/how-to:add-to-ci-workflow), store `TESTSPACE_TOKEN` as a secure environment variable

appveyor.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
version: 1.0.{build}
22
configuration: Debug
33

4+
install:
5+
- appveyor DownloadFile https://testspace-client.s3.amazonaws.com/testspace-windows.zip
6+
- 7z x -y testspace-windows.zip
7+
- testspace config url samples.testspace.com
8+
- testspace -v
9+
410
build_script:
511
- nuget restore money/cs-money.sln
612

@@ -9,7 +15,4 @@ test_script:
915
- .\money\packages\OpenCover.4.6.519\tools\OpenCover.Console -target:".\money\packages\NUnit.ConsoleRunner.3.4.1\tools\nunit3-console.exe" -targetargs:"money\bin\Debug\cs-money.dll" -output:"coverage.xml" -filter:"+[*]* -[*]*MoneyTest*" -register:user
1016

1117
after_test:
12-
- set PATH=C:\Program Files\Git\mingw64\bin;%PATH% #http://help.appveyor.com/discussions/problems/6312-curl-command-not-found
13-
- curl -fsS -o testspace-windows.zip https://testspace-client.s3.amazonaws.com/testspace-windows.zip
14-
- 7z x -y testspace-windows.zip
15-
- testspace @.testspace.txt %TESTSPACE_TOKEN%/%APPVEYOR_REPO_NAME:/=:%/%APPVEYOR_REPO_BRANCH%#appveyor.build.%APPVEYOR_BUILD_NUMBER%
18+
- testspace analysis.xml [Tests]TestResult.xml coverage.xml

desktopbuild.bat

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
REM Remove any old test content
22
del *.xml
33

4+
REM "install"
5+
wget -q https://testspace-client.s3.amazonaws.com/testspace-windows.zip
6+
7z x -y testspace-windows.zip
7+
del testspace-windows.zip
8+
SET CI=true & testspace config url samples.testspace.com
9+
testspace -v
10+
11+
REM "before_script"
12+
REM nuget restore money/cs-money.sln
13+
414
REM "test_script:"
515
msbuild money\cs-money.csproj /p:platform=anycpu /p:configuration=debug /p:runCodeAnalysis=true /p:codeanalysislogfile=..\analysis.xml
616
.\money\packages\OpenCover.4.6.519\tools\OpenCover.Console -target:".\money\packages\NUnit.ConsoleRunner.3.4.1\tools\nunit3-console.exe" -targetargs:"money\bin\Debug\cs-money.dll" -output:"coverage.xml" -filter:"+[*]* -[*]*MoneyTest*" -register:user
717

818
REM "after_test:"
9-
curl -fsS -o testspace-windows.zip https://testspace-client.s3.amazonaws.com/testspace-windows.zip
10-
7z x -y .\testspace-windows.zip
11-
del testspace-windows.zip
12-
13-
for /f %%i in ('git symbolic-ref --short HEAD') do set BRANCH_NAME=%%i
14-
testspace @.testspace.txt %TESTSPACE_TOKEN%/testspace-samples:csharp.nunit/%BRANCH_NAME%#desktop.Build
19+
testspace analysis.xml [Tests]TestResult.xml coverage.xml "#desktop.Build"

0 commit comments

Comments
 (0)