Section 3: Other automated build tools
Any build tool that can run a program and check the exit code can be used to incorporate CloudTest.
Here is an example using
make
:
SCOMMAND_HOME=/Downloads/scommand
SCOMMAND_BIN=$(SCOMMAND_HOME)/bin
CLOUDTEST_URL=localhost:8080/concerto
CLOUDTEST_USERNAME=exampleuser
CLOUDTEST_PASSWORD=***
all: cloudtests
cloudtests:
$(SCOMMAND_BIN)/scommand cmd=play type=composition name="/My tests/Composition 1"
url=$(CLOUDTEST_URL) username=$(CLOUDTEST_USERNAME) password=$(CLOUDTEST_PASSWORD) wait
Using the
play
command with the
wait
parameter causes SCommand to wait until the composition (or playlist) finishes, and then exit with code
0
if the test passes, or code
1
if it fails.