Follow

Sending Continuum Testing Results to AMP

Introduction

Access Continuum allows customers who also have an AMP license to send their testing results to reports within AMP. Doing this allows customers to regularly report on accessibility for an asset over time, by testing at various points in the SDLC. For example, an organization may choose to use Continuum to test their application whenever a new release branch is created, and in this use they may want to test and report those results to the analogous Asset within AMP.

API Token Key

Connecting your Access Continuum instance to AMP will require use of an API Token Key to authorize the connection. The API Token Key can be accessed as follows:

  1. In your AMP instance, select the "Preferences" link in the application header bar. 
  2. Select the "API Token Management" link. 
  3. Select the "Create Token" button and specify a name that indicates where the token will be used (e.g., Acme Mobile App Regression Build).
  4. Copy the token from the "Token" column. 

The API Token should be pasted into the relevant field in the continuum.properties file.

AMPReportingService Class

Included with Access Continuum, for Java or Javascript, is a public class that encapsulates all functionality related to sending Continuum-found violation instances to AMP -- AMPReportingService. This class is identical between the Java and Javascript versions of Continuum.

To send data to AMP: 

  1. Define the reporting strategy -- either create new reports or edit existing ones -- using AMPReportingService.ReportManagementStrategy
  2. Define the strategy for writing to new modules or editing existing ones using AMPReportingService.ModuleManagementStrategy.
  3. Once the strategies for writing to a report and module are specified, the submitAccessibilityConcernsToAMP(List) method can be invoked.

Finding Organization and Other Identifiers in AMP

When writing data to AMP, it is required to know the ID for the organization and, in some cases, the reports and modules. To find the organization ID, select the organization using the organization selector in the top AMP nav bar (Button to Switch AMP Organization). The organization ID will be displayed in the URL in the browser address bar (e.g., "organization_id=12345"). Report IDs can be found in the same way.

Why Send Continuous Testing Data to AMP?

There are several use cases for sending data from Continuum to your AMP instance. In general, they fall into two categories:

  1. Reporting in which the compliance of the current build should always be displayed:  In this case, the organization may choose to always overwrite all data in the same report, so a single report always represents the current state of accessibility for the asset in development. For this use case, the recommended reporting strategy to use is ReportManagementStrategy.OVERWRITE and ModuleManagementStrategy.OVERWRITE which will allow you to always overwrite the data previously sent to a report in AMP.
  2. Post-development report, in which the compliance ahead of a release should be displayed: In this case, the organization regularly reports on compliance at a specific point in the SDLC, such as just after a release build is branched to incorporate accessibility testing into the regression testing process. In this case, the organization may choose to write test results from Continuum to a new report every time this testing is done, so they can report on accessibility over time. Doing this allows the organization to identify issues that regularly make their way into release candidates, so they can institute new processes and training to address the problems at the root cause level. For this use case, the recommended reporting strategy to use is ReportManagementStrategy.UNIQUE and ModuleManagementStrategy.APPEND which will allow you to always create a new report and to add new modules to that report, instead of overwriting them.

Code Examples

Continuous Integration Use Case

The code example below demonstrates a sample implementation of the continuous integration use case, described above, in which reporting is done at a regular point in the SDLC and data is always written to a new report. In this example, note that a new report and a new module within that report are created to house the violation instances found in testing.

List<AccessibilityConcern> accessibilityConcerns = continuum.runAllTests();
if (accessibilityConcerns.size() > 0) {
AMPReportingService ampReportingService = continuum.getAMPReportingService();
ampReportingService.setActiveOrganization(1099); // ID of AMP organization to submit test results to
ampReportingService.setActiveAsset(36030); // ID of AMP asset to submit test results to
ampReportingService.setActiveReport("Report from CI");
ampReportingService.setActiveModule("Login Screen", driver.getCurrentUrl());
ampReportingService.setActiveReportManagementStrategy(AMPReportingService.ReportManagementStrategy.UNIQUE);
ampReportingService.setActiveModuleManagementStrategy(AMPReportingService.ModuleManagementStrategy.APPEND);
ampReportingService.submitAccessibilityConcernsToAMP(accessibilityConcerns);
}

Developer Workstation Use Case

The code example below demonstrates a sample continuous testing use case in which developers are running tests regularly as they update code. In this example, the developer would always overwrite results in a single report in AMP, which would always represent the current state of the application.

accessibilityConcerns = continuum.runAllTests();
if (accessibilityConcerns.size() > 0) {
    AMPReportingService ampReportingService = continuum.getAMPReportingService();
    ampReportingService.setActiveOrganization(1099);  // ID of AMP organization to submit test results to
    ampReportingService.setActiveAsset(36030);  // ID of AMP asset to submit test results to
    ampReportingService.setActiveReport("Report from Developer Workstation");
    ampReportingService.setActiveModule("Login Screen", driver.getCurrentUrl());
    ampReportingService.setActiveReportManagementStrategy(AMPReportingService.ReportManagementStrategy.OVERWRITE);
    ampReportingService.setActiveModuleManagementStrategy(AMPReportingService.ModuleManagementStrategy.OVERWRITE);
    ampReportingService.submitAccessibilityConcernsToAMP(accessibilityConcerns);
}
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Level Access Support
www.levelaccess.com | 800.889.9659
© 2005 - 2018 - Level Access All rights reserved.
Privacy | Security | Credits | License