Balaji Vajjala's Blog

A DevOps Blog from Trenches

03.05

  • 3.3 Write scripted deployment (smoke) tests
    • Learning Objectives
    • EXERCISE: View and run a suite of deployment tests
    • EXERCISE: View and run a suite of deployment tests (OPTIONAL)

3.3 Write scripted deployment (smoke) tests

Learning Objectives

By the end of this lesson you will be able to:

  • View and run a deployment test.

EXERCISE: View and run a suite of deployment tests

  1. On your AWS CLI instance or your local environment, go to the test directory. See https://github.com/stelligent/continuous_integration_example/tree/master/software/tests/infrastructure/features

    “` $ cd /home/ec2-user/continuous_integration_example/software/tests/infrastructure/features

    “`

  2. Open the deployment.feature file.

    “` $ sudo vim deployment.feature

    “`

  3. Modify target environment DNS. Change target.devopscloud.com to the DNS of the target environment. You can find this by going to your Jenkins Environment job and look for echo ip_address= in the Console Output of the job. Copy this value and paste it into the deployment.feature test. Save the file and push it to your Github master.

    “` Scenario: The application is up and running When I run “/usr/bin/wget -qO- http://target.devopscloud.com” Then I should see “Brewery Manager”

    “`

  4. Go to your Jenkins instance and run the Deployment job.

EXERCISE: View and run a suite of deployment tests (OPTIONAL)

  1. On your AWS CLI instance or your local environment, go to the tests directory.

    “` $ cd /home/ec2-user/devopsinthecloud/test/features

    “`

  2. Open the deployment.feature file.

    “` $ sudo vim deployment.feature

    “`

  3. Go to your Jenkins instance and run the Deployment job.