BDD tests for Jenkins X using ginkgo
- golang https://golang.org/doc/install#install
- a Jenkins X installation
make bootstrap
will install ginkgo gomega and dep
To enable the report
goal you will also need to install xunit-viewer via:
make bootstrap-report
If you are running the tests locally you probably want to set:
export GIT_ORGANISATION="my_cool_github_username"
Then to run all the tests in parallel:
make test-parallel
If you want the sequential version (You may be some time):
make test
Or you can run an individual spec like this:
make test-quickstart-golang-http
To add the HTML report generation add the goal html-report
like this:
make test html-report
To enable verbose logging do this before running make
export GINKGO_ARGS=-v
To run a test suite against the jacoco app you can run:
make test-app-lifecycle
This will test jx add app
and jx delete app
against a known stable version of jx-app-jacoco
To run the same tests as above against multiple apps and versions you can use the following syntax:
JX_BDD_INCLUDE_APPS=jx-app-jacoco:0.0.100,my-app:0.0.1 make test-app
GINKGO_ARGS
to pass in any ginkgo command line arguments, like-v
for verbose loggingGIT_PROVIDER_URL
the git provider URL to test against. e.g. your GitHub Enterprise or BitBucket URLJX_DISABLE_CLEAN_DIR
set totrue
to disable cleaning up of the temporary work directoriesJX_DISABLE_DELETE_APP
set totrue
to disable deleting of the app from Jenkins X after a testJX_DISABLE_DELETE_REPO
set totrue
to disable deleting of the repo from Jenkins X after a testJX_DISABLE_TEST_PULL_REQUEST
set totrue
to disable testing the PR workflowJX_DISABLE_WAIT_FOR_FIRST_RELEASE
set totrue
to disable waiting for the first release pipeline to complete. Handy if you are testing/debugging the Pull Request flow as it speeds up the test
See Debugging for guidance on how to debug these tests in various IDEs.