1.5 Change an existing automated test

Learning Objectives

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

Change an existing automated test

Slide1

EXERCISE: Make changes to an automated test and commit to GitHub

  1. From your AWSCLI instance, go to the unit tests directory.
  2. $ cd /home/ec2-user/continuous_integration_example/software/tests/unit/com/beer/business/service
    					
  3. Open the test file as shown below.
    $ sudo vim BeerServiceUnitTest.java  
    				
  4. Make a modification to the contents of the file and save it.
  5. Add the file in Git
    $ git add BeerServiceUnitTest.java 
    						
  6. Commit the file to Git
    $ git commit -m "Modified test script"
    						
  7. Push it to the Git master.
    $ git push
    						  

EXERCISE: Make changes to an automated test and commit to GitHub (OPTIONAL)

  1. From your AWSCLI instance, go to sample_app.
  2. $ cd /home/ec2-user/sample_app/spec/controllers
    				
  3. Open the test file as shown below.
    $ sudo vim users_controller_spec.rb 
    			
  4. Make a modification to the contents of the file and save it.
  5. Add the file in Git
    $ git add .
    					
  6. Commit the file to Git
    $ git commit -m "Modified test script"
    					
  7. Push it to the Git master.
    $ git push