The Smoke Test plugin is an XL Deploy plugin that triggers http requests at the end of the deployment task. It uses either wget executable file (Unix / Windows) or Invoke-WebRequest PowerShell cmdlet (Windows).
- XL Deploy requirements
- XL Deploy: version 6.0.+
Place the plugin xldp file into your SERVER_HOME/plugins directory.
A smoketest.Runner CI is a container from which the test will be performed.
3 Deployables are provided that will be deployed onto a smoketest.Runner
smoketest.HttpRequestTestfor a HTTP request using the GET verbsmoketest.HttpPostRequestTestfor a HTTP request using the POST verbsmoketest.HttpPostRequestFileTestfor a HTTP request using the POST verb and a file that contains the post data.
You can specify what text you expect to be in the response, like version numbers. And/or you can specify the text that should not be in the response, like error statements.
On Unix hosts, the plugin will use wgetthat should be already installed.
On Windows hosts, there are 2 options
- use a version of
wgetbundled in the plugin and uploaded to perform the http request. (default option) - use a PowerShell implementation. To activate this option you need to
** enable the property powershellInstalled
on thesmoketest.Runner` ** install PowerShell v3+ on the remote Windows Host.
If you wish to use a different wget that is already present on the path of your target systems you can simply prevent the included version from being uploaded by modifying SERVER_HOME/conf/deployit-defaults.properties as follows:
# Classpath Resources
# smokeTest.ExecutedHttpRequestTest.classpathResources=smoketest/runtime/wget.exe
to
# Classpath Resources
smokeTest.ExecutedHttpRequestTest.classpathResources=
xl apply --xl-deploy-url http://localhost:4540 -f xebialabs.yaml
[1/4] Applying infrastructure.yaml (imported by xebialabs.yaml)
Created CI Infrastructure/xld-smoke-test/localhost/test runner
Created CI Infrastructure/xld-smoke-test/localhost
Created CI Infrastructure/xld-smoke-test
[2/4] Applying environments.yaml (imported by xebialabs.yaml)
Created CI Environments/xld-smoke-test/dev
Created CI Environments/xld-smoke-test/dev.conf
Created CI Environments/xld-smoke-test
[3/4] Applying applications.yaml (imported by xebialabs.yaml)
Created CI Applications/xld-smoke-test/postcodes.io/1.0/manual test
Created CI Applications/xld-smoke-test/postcodes.io/1.0/get
Created CI Applications/xld-smoke-test/postcodes.io/1.0/post file
Created CI Applications/xld-smoke-test/postcodes.io/1.0/post
Created CI Applications/xld-smoke-test/postcodes.io/1.0
Created CI Applications/xld-smoke-test/postcodes.io
Created CI Applications/xld-smoke-test
[4/4] Applying xebialabs.yaml
Done
``
