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## PHP/PHPUnit sample for demonstrating Testspace
66
77Sample demonstrates techniques for using Testspace with PHP code and the [ PHPUnit test framework] ( https://phpunit.de/ ) .
88
9+ * Using a Testspace Project that is ` connected ` with this GitHub Repo
10+ * Using 3 Online CI services for demonstration purposes only
11+ * Can review the Results at [ testspace-samples: php .phpunit] ( https://samples.testspace.com/projects/testspace-samples:php.phpunit )
12+ * Refer to our [ Getting Started] ( https://help.testspace.com/getting-started ) help articles for more information
13+
914***
1015Using Multiple Online CI Services:
1116
@@ -16,14 +21,20 @@ Using Multiple Online CI Services:
1621***
1722Publishing ** Test Content** using www.testspace.com .
1823
19- [ ![ Space Health] ( https://samples.testspace.com/spaces/788/badge )] ( https://samples.testspace.com/spaces/788 " Test Cases ")
20- [ ![ Space Metric] ( https://samples.testspace.com/spaces/788/metrics/727/badge )] ( https://samples.testspace.com/spaces/788/schema/Code%20Coverage " Code Coverage (methods) ")
21- [ ![ Space Metric] ( https://samples.testspace.com/spaces/788/metrics/728/badge )] ( https://samples.testspace.com/spaces/788/schema/Code%20Coverage " Code Coverage (statements) ")
22- [ ![ Space Metric] ( https://samples.testspace.com/spaces/788/metrics/729/badge )] ( https://samples.testspace.com/spaces/788/schema/Static%20Analysis " Static Analysis (issues) ")
23-
24+ [ ![ Space Health] ( https://samples.testspace.com/spaces/788/badge?token=a5b5d2ad4ec3d1e2eefc87cbe8c994342047dad4 )] ( https://samples.testspace.com/spaces/788 " Test Cases ")
25+ [ ![ Space Metric] ( https://samples.testspace.com/spaces/788/metrics/728/badge?token=19e7e9c538ae12e6720cf1487ce7c67520613293 )] ( https://samples.testspace.com/spaces/788/schema/Code%20Coverage " Code Coverage (statements) ")
26+ [ ![ Space Metric] ( https://samples.testspace.com/spaces/788/metrics/729/badge?token=615ea7773881334762ac85f47402bf4f559d67ed )] ( https://samples.testspace.com/spaces/788/schema/Static%20Analysis " Static Analysis (issues) ")
2427
2528***
2629
30+ Download and configure the Testspace client
31+
32+ <pre >
33+ mkdir -p $HOME/bin
34+ curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
35+ testspace config url samples.testspace.com
36+ </pre >
37+
2738In order to run this sample you will need a host workstation that supports the PHP.
2839
2940Installation
@@ -45,19 +56,9 @@ vendor/bin/phpunit tests/unit --log-junit tests-results.xml --coverage-clover co
4556
4657Pushing Content using ** Testspace client** :
4758
59+ Push Content using Testspace client
60+
4861<pre >
49- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
50- testspace @.testspace.txt $TESTSPACE_TOKEN/$GITHUB_ORG:$REPO_NAME/$BRANCH_NAME#$BUILD_NUMBER
62+ testspace @.testspace.txt
5163</pre >
5264
53- Checkout the published [ Test Content] ( https://samples.testspace.com/projects/testspace-samples:php.phpunit ) . 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.
54-
55- ***
56-
57- To replicate this sample:
58- - Setup account at www.testspace.com .
59- - Create a Environment variable called ` TESTSPACE_TOKEN `
60- - ` TESTSPACE_TOKEN ` =
` [email protected] ` 61- - ` credentials ` set to ` username:password ` or your [ access token] ( http://help.testspace.com/reference:client-reference#login-credentials )
62- - 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
63-
0 commit comments