Blog

test center

Learn What's New in Test Center 2.0

March 27, 2020 · by Gokul Sengottuvelu ·

This blog is part of the Akamai Platform Release, where we’re giving you all the details about what Akamai has added and improved for developers! You can view all of our updates here.  

Every change in your configuration has the potential to break your web properties, which can lead to poor customer experiences, service outages, and even a loss in revenue. Akamai Test Center is a regression testing tool that allows you to test configuration changes before deploying them in production. It also enables automated testing with APIs that enhance productivity and decrease sprint cycle turnaround times. 

With new features available in March 2020, Test Center can now help developers and admins perform two different kinds of testing: comparative and functional. In this blog post, let’s review Test Center 1.0 and explore how the new features in 2.0 can improve the testing process.

Test Center 1.0

Test Center 1.0 allows the comparative testing necessary for increased confidence in new code releases. It is designed to enhance  the safety of configurations and enable you to compare production and pre-production request handling. It also warns whenever there is an unexpected change in site behavior.

An example of a 1.0 workflow follows:

  1. Create a test definition

  2. Add a test case to a test definition

  3. Submit a test run

  4. Retrieve the differences

  5. Navigate the differences and take action

Test Center 2.0

After working closely with test engineers and listening to feedback from Akamai developers and admins, Test Center 2.0 introduces functional testing. This new capability makes it possible to define expected values and validate the correctness of configuration changes in the test report.

New features in 2.0 enable you to: 

  • Define test suites, test cases, and requirements

  • Associate test suites and requirements (and thereby to property configuration versions)

  • Allow cloning of any of the system objects (single and bulk)

  • Enable stateful and stateless execution of multiple test cases

  • Configure test runs, view results, and apply verification logic

Here is an example of a workflow in 2.0:

Define your expected values as conditions, such as response codes and variable values: 

Alternatively, you can use the API as shown below:

test center

Request: POST /test-management/v2/functional/test-catalog/conditions 


{
    "createdBy": "gsengott",
    "createdDate": "2020-02-14T09:50:39+0000",
    "modifiedBy": "gsengott",
    "modifiedDate": "2020-02-14T09:50:39+0000",
    "conditionId": 300,
    "condition": {
        "conditionNodeId": 1,
        "values": [
            "redirect"
        ],
        "conditionNode": {
            "conditionNodeId": 2,
            "values": [
                "isOneOf"
            ],
            "conditionNode": {
                "conditionNodeId": 13,
                "values": [
                    301
                ],
                "conditionNode": {
                    "conditionNodeId": 18,
                    "values": [
                        "location"
                    ],
                    "conditionNode": {
                        "conditionNodeId": 23,
                        "values": [
                            "is"
                        ],
                        "conditionNode": {
                            "conditionNodeId": 4,
                            "values": [
                                "/product"
                            ],
                            "conditionNode": null
                        }
                    }
                }

            }
        }
    }
}

Response: 200 OK

Create and add test cases to your test suite in five steps:

Associate the test case with your test suite (optionally)

  1. Create or add your conditions

  2. Create or add the appropriate test requests

  3. Select client profiles (IP Version: IPv6, Browser: Chrome v72, Location: U.S., for example)

  4. Double-check the details in the summary tab, and generate

Test case creation is also possible with the API, as shown below:

test

Request : POST /test-management/v2/functional/test-cases



   { 
      "testRequestId":234,
      "conditionId":300,
      "clientProfileId":1
   }
]

Response: 201 CREATED

Run your test suite and monitor the results instantly:

testc

 

Request : POST: /test-management/v2/test-runs


{
  "functional": {
    "testSuiteExecutions": [
      {
        "testSuiteId": 72,
        "testCaseIds": [
          612,
          609,
          607
        ]
      }
    ]
  },
  "targetEnvironment": "staging",
  "note": "Testing 1 test suites on staging.",
  "sendEmailOnCompletion": true
}

Response: 201 CREATED

{
  "testRunId": 16308,
  "status": "in_progress",
  "targetEnvironment": "staging",
  "note": "Testing 1 test suites on staging.",
  "functional": {
    "testSuiteExecutions": [
      {
        "testSuiteId": 72,
        "testCaseIds": [
          609,
          612
        ],
        "testSuiteExecutionId": 124,
        "status": "in_progress"
      }
    ],
    "status": "in_progress"
  },
  "submittedBy": "gsengott",
  "submittedDate": "2020-02-14T11:05:20+0000"
}

The results are retrieved as follows (other tools can leverage this in the testing workflow):

equest: GET /test-management/v2/test-runs/16309

Response: 200 OK

{
  "testRunId": 16308,
  "status": "completed",
  "targetEnvironment": "staging",
  "note": "Testing 1 test suites on staging.",
  "functional": {
    "testSuiteExecutions": [
      {
        "testSuiteId": 72,
        "testCaseExecutions": [
          {
            "testCaseId": 609,
            "testCaseExecutionId": 124,
            "status": "completed",
            "conditionEvaluationResult": {
              "result": "passed",
              "actualConditionData": [
                {
                  "name": "cachingOption",
                  "value": "no-store"
                }
              ]
            },
            "completedDate": "2020-02-14T11:10:50+0000"
          },
          {
            "testCaseId": 612,
            "testCaseExecutionId": 124,
            "status": "completed",
            "conditionEvaluationResult": {
              "result": "passed",
              "actualConditionData": [
                {
                  "name": "cachingOption",
                  "value": "no-store"
                }
              ]
            },
            "completedDate": "2020-02-14T11:10:50+0000"
          }
        ],
        "testSuiteExecutionId": 124,
        "status": "completed",
        "completedDate": "2020-02-14T11:10:50+0000"
      }
    ],
    "status": "completed"
  },
  "submittedBy": "gsengott",
  "submittedDate": "2020-02-14T11:10:18+0000",
  "completedDate": "2020-02-14T11:10:50+0000"
}

Test Center doesn’t replace any form of unit testing — the goal of this tool is to make sure that it’s safe to push your configuration changes. Test Center 2.0 functional testing capabilities, along with V2.0 APIs, will be available starting March 31.