Skip to content

The Smoke Tests plugin is an XL Deploy plugin that triggers http requests at the end of the deployment task.

License

Notifications You must be signed in to change notification settings

xebialabs-community/xld-smoke-test-plugin

Repository files navigation

Smoke Test plugin

Build Status Codacy Badge Code Climate License: MIT Github All Releases

Overview

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).

Requirements

  • XL Deploy requirements
    • XL Deploy: version 6.0.+

Installation

Place the plugin xldp file into your SERVER_HOME/plugins directory.

Usage

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.HttpRequestTest for a HTTP request using the GET verb
  • smoketest.HttpPostRequestTest for a HTTP request using the POST verb
  • smoketest.HttpPostRequestFileTest for a HTTP request using the POST verb and a file that contains the post data.

Expected and Unexpected text

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.

Note

On Unix hosts, the plugin will use wgetthat should be already installed. On Windows hosts, there are 2 options

  • use a version of wget bundled 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 powershellInstalledon 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=

XLD Smoke Test plugin in action

Sample App

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
``

About

The Smoke Tests plugin is an XL Deploy plugin that triggers http requests at the end of the deployment task.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published