Test your property

While it's not required, you should thoroughly test your property on staging before serving traffic through the ​Akamai​ production network.

🚧

​Akamai​'s staging network is a subset of servers you use for testing property changes rather than performance. As the individual servers in the staging network can change over time, you should always perform the IP address resolution described below before you start a new round of testing. Don't use an IP address you resolved with previous testing, and don't use the same IP address for an extended period of time.

Before you begin

  • Make sure you activate a property version on the staging network.
  • HTTPS custom certs only. Push the edge certificate to staging. If you're going to use a custom certificate for the client to edge server connection, you need to push it to the staging network before you test your HTTPS delivery. By default, when you create a CPS-managed certificate, it is automatically deployed to the production network. To test the cert, you need to manually push it to the staging network. See Certificate Provisioning System for detailed instructions.

1. Look up the edge server IP address on staging

To test a property, first obtain the IP address of the edge server used on the staging network.

  1. In the Property Manager Editor, in the Property Hostnames content panel, find and make note of your edge hostname.

  2. To the edge hostname you noted, append -stagingbefore the final .net. Resolve the IP address of the staging version of that edge hostname:

    • Windows: Open a new command prompt and perform an nslookupof the staging hostname:
    nslookup www.example.com.edgekey-staging.net
    
    • Mac OS, Linux, or Unix: Open a new terminal, and perform a digof the staging hostname:
    dig www.example.com.edgekey-staging.net
    

    Copy the IP address of the staging edge hostname that appears in the response.

  3. If you're using Global Traffic Management (GTM) or China CDN:

    1. In the lookup response, make note of the CNAME hostname, for example, e1111.x.akamaiedge.net. For nslookup, this value is in the Name field.

    2. Perform the look-up again, appending -staging before the final .net, for example e1111.x.akamaiedge-staging.net.

    3. Copy the IP address of the staging edge hostname.

2. Point your browser to the staging server

Modify your hosts file to point your hostname to the staging edge hostname.

  1. Open your local hosts file in a text editor. See your operating system's user documentation for the default location of the hosts file. Typically, you can find it in these directories:

    • Windows: Navigate to C:\Windows\System32\drivers\etc\hosts. The directory above \system32\ might vary in your environment.

    • macOS: Navigate to /private/etc/hosts.

    • On Linux/Unix: Navigate to /etc/hosts.

  2. At the end of the hosts file, add an entry that includes the staging edge hostname's IP address and your property hostname. For example: 12.34.56.78 www.example.com

  3. Save and close the hosts file.

    All requests from a browser to your domain will point to the staging edge server. This change only applies to your local system and doesn't affect anyone else.

    To undo that redirection, remove the new entry from your hosts file.

  4. Flush your local DNS cache:

  • Windows: Open a new command prompt and run this command:
    ipconfig /flushdns
    
  • macOS : Open a new terminal and run this command:
    sudo killall -HUP mDNSResponder
    

3. Confirm that your computer points to a staging edge server

  1. Use a command-line tool such as curl to verify that you've properly pointed your system to the staging edge server:
  • If you're using Enhanced Debug, generate an auth token and pass it in the Akamai-Debug header on the HTTP request:

    curl -vvvv "https://www.example.com/" -H "Akamai-Debug: exp=1762...700b cache"
    
    HTTP/1.1 200 OK
    ...
    X-Akamai-Staging: ESSL
    X-Cache: TCP_MISS from ...
    
  • If you're using Pragma debugging, specify the Pragma header on the HTTP request:

    curl -vvvv "https://www.example.com/" -H "Pragma: akamai-x-cache-on, akamai-x-cache-remote-on"
    
    HTTP/1.1 200 OK
    ...
    X-Akamai-Staging: ESSL
    X-Cache: TCP_MISS from ...
    

    Making a request to ​Akamai​ staging edge servers adds the HTTP response header X-Akamai-Staging. The value sent with this header is either X-Akamai-Staging: ESSL for requests to the staging network using Enhanced TLS edge hostname or X-Akamai-Staging: EdgeSuite for requests to the staging network using Standard TLS edge hostname.

  1. Check for the X-Cacheresponse header. Use this list to interpret the results:
Did the page load as expected?Is the X-Cache header present?Result
YesYesSuccess! You're ready to test.
NoYesYou reached an edge server, but something isn't working. The value of the X-Cache entry might help you identify the problem.
YesNoYou reached the origin, not the edge server. Check the entry you added to your hosts file.
NoNoYou have not reached either the edge or your origin. Check the entry you added to your hosts file.

4. Test your property on staging

Test your site just as you would if you were testing on the origin server.

🚧

When testing, use your actual domain for requests—don't use its edge hostname. Edge hostnames are applied automatically by your DNS to reroute requests to the ​Akamai​ network.

  1. Check your site's key functionality, such as logging in, using the shopping cart, playback and so on.

  2. Once you're satisfied that your site works, remove the new entry from your hosts file and save it. Flush your local DNS cache again.

  3. If the testing is successful, you can push the property and, if applicable, the associated custom edge certificate, to the ​Akamai​ production network.

Check out ​Akamai​ Test Center

If you'd rather not use the manual process we discuss above, you can access the Test Center interface in ​Control Center​ to help with testing.

What is Test Center?

Test Center is a testing tool that checks the effect the changes in settings will have on your property. It helps you ensure that your changes aren't behaving unexpectedly before you activate them in production. It helps prevent issues caused by misconfiguration and insufficient testing and increases your confidence in the safety and correctness of your changes.

The application lets you run two types of tests:

  • Functional testing. This lets you check if the property changes work as expected.
  • Comparative testing. This lets you compare the behavior of your hostnames between the current and new property versions.

It was designed as an addition to your existing tests and workflows, and not as their replacement. It's available as a user interface in ​Akamai Control Center​ and as an API.