Skip to content

Commit b2d4705

Browse files
committed
updates for new release
1 parent df7e978 commit b2d4705

File tree

6 files changed

+48
-56
lines changed

6 files changed

+48
-56
lines changed

.c9build.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ mvn pmd:pmd
1313
# Test
1414
mvn cobertura:cobertura -Dcobertura.report.format=xml
1515

16-
# Push content
17-
18-
## Requires TESTSPACE_TOKEN = $ACCESS_TOKEN:@samples.testspace.com.
16+
# Download and configure the Testspace client
17+
mkdir -p $HOME/bin
18+
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
19+
# note c9 host requires "access token", storing in ~/.netrc (refer to https://help.testspace.com/reference:client-reference#login-credentials)
20+
CI=true testspace config url samples.testspace.com
1921

20-
BRANCH_NAME=`git symbolic-ref --short HEAD`
21-
GIT_URL=`git remote show origin -n | grep Fetch\ URL: | sed 's/.*URL: //'`
22-
REPO_SLUG=`echo ${GIT_URL#*github.com?} | sed 's/.git//'`
23-
24-
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
25-
testspace @.testspace.txt $TESTSPACE_TOKEN/${REPO_SLUG/\//:}/${BRANCH_NAME}#c9.Build
22+
# Push content
23+
testspace target/pmd.xml [Tests]target/surefire-reports/TEST*.xml target/site/cobertura/coverage.xml "#c9.Build" --repo git

.testspace.txt

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

.travis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
language:
22
- java
33

4+
before_script:
5+
- mkdir -p $HOME/bin
6+
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
7+
- testspace config url samples.testspace.com
8+
49
script:
510
- mvn clean compile
611
- mvn pmd:pmd
712
- mvn cobertura:cobertura -Dcobertura.report.format=xml
813

9-
# Requires TESTSPACE_TOKEN environment variable.
1014
after_script:
11-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
12-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${TRAVIS_REPO_SLUG/\//:}/${TRAVIS_BRANCH}#travis.Build.${TRAVIS_BUILD_NUMBER}
13-
15+
- testspace target/pmd.xml [Tests]target/surefire-reports/TEST*.xml target/site/cobertura/coverage.xml

README.md

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

33
***
44

55
## Java/JUnit sample for demonstrating Testspace
66

77
Sample demonstrates techniques for using Testspace with Java code and the [JUnit](http://junit.org/).
8+
* Using a Testspace Project that is `connected` with this GitHub Repo
9+
* Using 3 Online CI services for demonstration purposes only
10+
* Can review the Results at [testspace-samples:java.junit](https://samples.testspace.com/projects/testspace-samples:java.junit)
11+
* Refer to our [Getting Started](https://help.testspace.com/getting-started) help articles for more information
812

913
***
1014
Using Multiple Online CI Services:
@@ -16,14 +20,21 @@ Using Multiple Online CI Services:
1620
***
1721
Publishing **Test Content** using www.testspace.com.
1822

19-
[![Space Health](https://samples.testspace.com/spaces/816/badge)](https://samples.testspace.com/spaces/816 "Test Cases")
20-
[![Space Metric](https://samples.testspace.com/spaces/816/metrics/789/badge)](https://samples.testspace.com/spaces/816/schema/Code%20Coverage "Code Coverage (branches)")
21-
[![Space Metric](https://samples.testspace.com/spaces/816/metrics/791/badge)](https://samples.testspace.com/spaces/816/schema/Code%20Coverage "Code Coverage (methods)")
22-
[![Space Metric](https://samples.testspace.com/spaces/816/metrics/792/badge)](https://samples.testspace.com/spaces/816/schema/Static%20Analysis "Static Analysis (issues)")
23-
23+
[![Space Health](https://samples.testspace.com/spaces/816/badge?token=fcc8e5d8cc3c4be1e51436d66b221b28ca53cfed)](https://samples.testspace.com/spaces/816 "Test Cases")
24+
[![Space Metric](https://samples.testspace.com/spaces/816/metrics/790/badge?token=fbb017e5c373db88c2c1abc34a7f399166c7f8dc)](https://samples.testspace.com/spaces/816/schema/Code%20Coverage "Code Coverage (lines)")
25+
[![Space Metric](https://samples.testspace.com/spaces/816/metrics/792/badge?token=ef2d78a844e4c40517f6209d0db0c179db05473c)](https://samples.testspace.com/spaces/816/schema/Static%20Analysis "Static Analysis (issues)")
2426

2527
***
2628

29+
Download and configure the Testspace client
30+
31+
<pre>
32+
mkdir -p $HOME/bin
33+
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
34+
testspace config url samples.testspace.com
35+
</pre>
36+
37+
2738
Build examples:
2839

2940
<pre>
@@ -32,22 +43,8 @@ Build examples:
3243
mvn cobertura:cobertura -Dcobertura.report.format=xml
3344
</pre>
3445

35-
Push Content using **Testspace client**:
46+
Push Content using Testspace client
3647

3748
<pre>
38-
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
39-
testspace @.testspace.txt $TESTSPACE_TOKEN/$GITHUB_ORG:$REPO_NAME/$BRANCH_NAME#$BUILD_NUMBER
40-
</pre>
41-
42-
Checkout the published [Test Content](https://samples.testspace.com/projects/testspace-samples:java.junit). 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.
43-
44-
***
45-
46-
To replicate this sample:
47-
- Setup account at www.testspace.com.
48-
- Create a Environment variable called `TESTSPACE_TOKEN`
49-
- `TESTSPACE_TOKEN` = `credentials@Your-Org-Name.testspace.com`
50-
- `credentials` set to `username:password` or your [access token](http://help.testspace.com/reference:client-reference#login-credentials)
51-
- 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
52-
53-
49+
testspace target/pmd.xml [Tests]target/surefire-reports/TEST*.xml target/site/cobertura/coverage.xml
50+
</pre>

circle.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ machine:
22
java:
33
version: openjdk7
44

5+
dependencies:
6+
pre:
7+
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
8+
- testspace config url samples.testspace.com
9+
510
test:
611
override:
7-
- mvn clean compile
8-
- mvn pmd:pmd
9-
- mvn cobertura:cobertura -Dcobertura.report.format=xml
12+
- mvn clean compile
13+
- mvn pmd:pmd
14+
- mvn cobertura:cobertura -Dcobertura.report.format=xml
1015

11-
# Requires TESTSPACE_TOKEN environment variable.
1216
post:
13-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
14-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${CIRCLE_PROJECT_USERNAME}:${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}#circle.Build.${CIRCLE_BUILD_NUM}
15-
17+
- testspace target/pmd.xml [Tests]target/surefire-reports/TEST*.xml target/site/cobertura/coverage.xml

shippable.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
language: java
22

3-
env:
4-
global:
5-
- secure: GKig6dRs9LpzK/MJ/24SWafAT20d7PIKD11EgBi2r13ZfG9lZi1Ous6LTh8DfRn+nBMHMH+bBbwG98pACzCrfrdRu1Lp3CgkxyV4oo2hPlnCUNhdrz96MrvD0ExAGDg4hB5T7jZzYWBwM5wHQLMi1hRGWdimZvHpeRmj2HJKLuf5Mf22srlh1PQxDKw6XlAngZpYqZp0TkVlWsVLCFhm8BiR3ftu3jIY9gcDHtNCcYUQ0MeX2K0HOsqKThVjNHGn48MTezXaCWFw0Mm5b08WNLp4uwbwaPEMSwMYsPb4QL15tMogOwVQp771QtWm+w7RAt16XfzAiLNcYGMMNT8rkA==
6-
73
build:
84
ci:
5+
- mkdir -p $HOME/bin
6+
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
7+
- testspace config url samples.testspace.com
98
- mvn clean compile
109
- mvn pmd:pmd
1110
- mvn cobertura:cobertura -Dcobertura.report.format=xml
1211

13-
# Requires TESTSPACE_TOKEN environment variable.
1412
on_success:
15-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
16-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${SHIPPABLE_REPO_SLUG/\//:}/${BRANCH}#ship.Build.${BUILD_NUMBER}
17-
13+
- testspace target/pmd.xml [Tests]target/surefire-reports/TEST*.xml target/site/cobertura/coverage.xml
14+
1815
on_failure:
19-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
20-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${SHIPPABLE_REPO_SLUG/\//:}/${BRANCH}#ship.Build.${BUILD_NUMBER}
16+
- testspace target/pmd.xml [Tests]target/surefire-reports/TEST*.xml target/site/cobertura/coverage.xml

0 commit comments

Comments
 (0)