9.2 Infrastructure Tests

Learning Objectives

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

Running Infrastructure Tests in Cucumber

  1. SSH into the AWSCLI instance.
    ssh -i ditc.pem ec2-user@ec2-23-20-85-212.compute-1.amazonaws.com
    			
  2. Go to devopsinthecloud/infrastructure/features/ directory.
    cd /home/ec2-user/devopsinthecloud/test/features
    			
  3. Open the target.feature file.
    sudo vim target.feature
    			
  4. Enter the command to run infrastructure tests remotely. You can get the IP Address of the target environment by going to the Outputs tab of the target environment stack in CloudFormation.
    cucumber target.feature env_ip=IPADDRESS_TARGETENV env_user=ec2-user
    			
  5. NOTE: These infrastructure tests are run as part of the TargetEnvironment job.