3.2 Infrastructure Tests

Learning Objectives

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

EXERCISE: Running Infrastructure Tests in Cucumber for Java app

  1. SSH into the AWSCLI instance. Your DNS name will be different.
    ssh -i cd29.pem ec2-user@PublicDNS
    			
  2. Go to the directory where Cucumber tests are located. 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
    			
  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.

EXERCISE: Running Infrastructure Tests in Cucumber (OPTIONAL)

  1. SSH into the AWSCLI instance - where 29 is your student id.
    ssh -i cd29.pem ec2-user@PublicDNS
    			
  2. Go to the directory where Cucumber tests are located.
    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.