Test harness Setup

In this module we will download and deploy the test harness.

  1. We need to clone the test harness repo:

    cd ~/
    git clone https://github.com/StevenDavid/win403-testharness.git
    
  2. Next we will need to update the “aws-ecs-tools-defaults.json” file. Specifically we want to update the following two fields:

    1. launch-subnets: use the same subnets as the RDS database
    2. launch-security-groups: use the same security group that was used for the lambda
    3. task-definition-task-role: update the {account Id} with your current account. You can get the current account ID by running the following command:

      aws sts get-caller-identity --output text --query Account
      
  3. Let’s get docker working on Cloud9 so that we can publish containers

    sudo yum install -y docker
    sudo usermod -a -G docker ec2-user
    sudo service docker start
    
  4. Now we want to deploy the test harness to ECS. Run the following command from the same directory as the “aws-ecs-tools-defaults.json” file:

    cd ~/win403-testharness/src
    dotnet ecs deploy-service
    

About Test Harness

The test harness has three main components:

  1. The Dashboard where you can see the test results. This is the root or home page for the Test harness. For example, if the IP for the test harness is 167.2.1.3, then the Dashboard is http://167.2.1.3/.
  2. Next is the run tests api commands. Assuming the same IP, those commands look like this:

    http://167.2.1.3/api/TestHarness/test/{Number of test}/{Parrellel runs in a single test}
    
  3. Lastly we have the reset data feature. This allows the removal of all previous tests. Again Assuming the same IP as above the API is located at:

    http://167.2.1.3//api/TestHarness/reset/