GithubHelp home page GithubHelp logo

xebialabs-community / xld-smoke-test-plugin Goto Github PK

View Code? Open in Web Editor NEW
1.0 40.0 1.0 1.16 MB

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

Home Page: http://xebialabs.com/

License: MIT License

PowerShell 17.12% FreeMarker 72.15% Shell 10.73%
wget xld xldeploy healthcheck smoketest

xld-smoke-test-plugin's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.