03.04
- 3.2 Infrastructure Tests
- Learning Objectives
- EXERCISE: Running Infrastructure Tests in Cucumber for Java app
- EXERCISE: Running Infrastructure Tests in Cucumber (OPTIONAL)
3.2 Infrastructure Tests
Learning Objectives
By the end of this lesson you will be able to:
- Define and run infrastructure tests in Cucumber.
EXERCISE: Running Infrastructure Tests in Cucumber for Java app
SSH into the AWSCLI instance. Your DNS name will be different.
“` ssh -i cd29.pem ec2-user@PublicDNS
“`
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
“`
Open the target.feature file.
“` sudo vim target.feature
“`
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
“`
NOTE: These infrastructure tests are run as part of the TargetEnvironment job.
EXERCISE: Running Infrastructure Tests in Cucumber (OPTIONAL)
SSH into the AWSCLI instance – where 29 is your student id.
“` ssh -i cd29.pem ec2-user@PublicDNS
“`
Go to the directory where Cucumber tests are located.
“` cd /home/ec2-user/devopsinthecloud/test/features
“`
Open the target.feature file.
“` sudo vim target.feature
“`
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
“`
NOTE: These infrastructure tests are run as part of the TargetEnvironment job.