22 Publishing Reports Using Third-Party Web Servers

This chapter provides information about publishing automation reports to third-party web servers.

After automating scenarios using the command-line interface, you may want to share automation reports with other users, or access these reports from a web server for easy access. You can publish your reports to third-party web servers to perform these actions.

Viewing Automation Reports Using Tomcat

To view automation reports using Tomcat, follow these steps:
  1. Install Tomcat. For more information, see the Tomcat website:

    https://tomcat.apache.org/

    Verify that your Tomcat server is running successfully by running the following in the URL of the Tomcat server:
    https://<tomcat-host>:<tomcat-server-port>
  2. Navigate to the config.properties folder in your automation workspace, and configure the path of the results to publish by running the following command:
    results.home=${WORKSPACE}/results/reports
    results.publish=YES
    results.publish.file=${WORKSPACE}/results/results.js
  3. Navigate to the Tomcat server using the path ${TOMCAT_HOME}/conf/server.xml.
    1. Run the following command to configure the STAP-DE automation execution reports:
         <Connector port="8080" protocol="HTTP/1.1"
                     connectionTimeout="20000"
                     redirectPort="8443"
                     maxParameterCount="1000"
                     />
           
          <Connector port="8099" protocol="HTTP/1.1"
                     redirectPort="8443" />
    2. Navigate to the <Content> tag under the <Host> tag and insert the path to where you run the automation reports:
      <Context docBase="${STAP_HOME}/sampleWorkSpace/results/" path="/stap-reports"
          />

      This creates an endpoint titled /stap-reports which stores the automation reports.

  4. Restart the Tomcat server.

Automation reports for all scenarios run are now published in the path ${host}:{port}/stap-reports. To access individual automation execution results, click on the respective link of the job.

Viewing Automation Reports Using NGINX

To view automation reports using NGINX, follow these steps:
  1. Install NGINX. For more information, see the NGINX website:

    https://nginx.org/

  2. As an administrator, navigate to the command prompt in your system, and start the NGINX server by running the following command:
    start nginx
  3. Navigate to the config.properties folder in your automation workspace, and configure the path of the results to publish by running the following command:
    results.home=${WORKSPACE}/results/reports
    results.publish=YES
    results.publish.file=${WORKSPACE}/results/results.js
  4. Configure the path for the automation reports in the nginx.conf file by running the following in the NGINX server:
    server {
            listen 80;
            server_name localhost;
    
            root ${STAP_HOME}/sampleWorkSpace/results;
            index index.html index.htm;
    
            location / {
                autoindex on;
                try_files $uri $uri/ /index.html;
            }
        }
  5. Restart the NGINX server.

Automation reports for all scenarios run are now published in the path ${nginx-host}:{nginx-server} in your web browser. To access individual automation execution results, click on the respective link of the job.

Viewing Automation Reports Using Apache HTTP Server

To publish automation reports using Tomcat, follow these steps:

  1. Install and configure the Apache HTTP server. For more information, see the Apache website:

    https://httpd.apache.org/

  2. Start the Apache HTTP server. Verify the successful installation by navigating to the port.
  3. Navigate to the config.properties folder in your automation workspace, and configure the path of the results to publish by running the following command:
    results.home=${WORKSPACE}/results/reports
    results.publish=YES
    results.publish.file=${WORKSPACE}/results/results.js
  4. Configure the path for the automation reports in the httpd.conf file by running the following:
    DocumentRoot "${STAP_HOME}/sampleWorkSpace/results/"
    <Directory "${STAP_HOME}/sampleWorkSpace/results/">
  5. Restart the Apache HTTP server.

Automation reports for all scenarios run are now published in the path ${host}:{server}. To access individual automation execution results, click on the respective link of the job.