public class AMPReportingService extends Object
AMPReportingService.ReportManagementStrategy
and AMPReportingService.ModuleManagementStrategy
, respectively), invoking submitAccessibilityConcernsToAMP(List)
will first create, overwrite, and/or delete reports and modules from AMP, then publish your test results to the active AMP module.
You can set the active report and module management strategies using setActiveReportManagementStrategy(ReportManagementStrategy)
and setActiveModuleManagementStrategy(ModuleManagementStrategy)
, respectively.
Only once all of these active items are set should you invoke submitAccessibilityConcernsToAMP(List)
using the list of accessibility concerns you'd like to report.
More on report and module management strategies: they are designed with two primary use cases in mind: continuous integration (CI) workflows (where you usually want to retain the results of previously published reports), and more manual workflows (e.g. when Continuum is run from a developer's local workstation, where you usually don't want to retain the results of previously published reports).
Choosing the correct report and module management strategies to meet your business objectives is critical to using Continuum's AMP reporting functionality correctly, so please consult our support documentation for more information.Modifier and Type | Class and Description |
---|---|
class |
AMPReportingService.Module
This class encapsulates all the metadata relevant to an AMP module.
|
static class |
AMPReportingService.ModuleManagementStrategy
Defines supported strategies with which to create new modules and edit existing ones.
|
class |
AMPReportingService.Report
This class encapsulates all the metadata relevant to an AMP report.
|
static class |
AMPReportingService.ReportManagementStrategy
Defines supported strategies with which to create new reports and edit existing ones.
|
Modifier and Type | Method and Description |
---|---|
AMPReportingService.Module |
getActiveModule()
Gets the active module.
|
AMPReportingService.Report |
getActiveReport()
Gets the active report.
|
void |
setActiveAsset(Integer assetId)
Validates the specified ID of an existing asset in AMP, then sets it as the active asset in Continuum such that next time
submitAccessibilityConcernsToAMP(List) is invoked, test results will be submitted to this active asset. |
void |
setActiveModule(Integer moduleId)
Validates the specified ID of an existing module in AMP, then sets it as the active module in Continuum such that next time
submitAccessibilityConcernsToAMP(List) is invoked, test results will be submitted to this active module. |
Integer |
setActiveModule(String moduleName,
String moduleLocation)
Sets the active module in AMP to submit test results to next time
submitAccessibilityConcernsToAMP(List) is invoked. |
void |
setActiveModuleManagementStrategy(AMPReportingService.ModuleManagementStrategy moduleManagementStrategy)
Sets the active module management strategy to use next time
submitAccessibilityConcernsToAMP(List) is invoked. |
void |
setActiveOrganization(Integer organizationId)
Validates the specified ID of an existing organization in AMP, then sets it as the active organization in Continuum such that next time
submitAccessibilityConcernsToAMP(List) is invoked, test results will be submitted to this active organization. |
void |
setActiveReport(Integer reportId)
Validates the specified ID of an existing report in AMP, then sets it as the active report in Continuum such that next time
submitAccessibilityConcernsToAMP(List) is invoked, test results will be submitted to this active report. |
Integer |
setActiveReport(String reportName)
Sets the active report in AMP to submit test results to next time
submitAccessibilityConcernsToAMP(List) is invoked. |
void |
setActiveReportManagementStrategy(AMPReportingService.ReportManagementStrategy reportManagementStrategy)
Sets the active report management strategy to use next time
submitAccessibilityConcernsToAMP(List) is invoked. |
boolean |
submitAccessibilityConcernsToAMP(List<AccessibilityConcern> accessibilityConcerns)
Submits accessibility concerns to the active AMP instance, organization, asset, report, and module.
|
public AMPReportingService.Module getActiveModule()
setActiveModule(Integer)
or setActiveModule(String, String)
hasn't been invoked to set an active module yet.
Use this to access the active module's metadata, e.g. its ID in AMP, its name, etc.public AMPReportingService.Report getActiveReport()
setActiveReport(Integer)
or setActiveReport(String)
hasn't been invoked to set an active report yet.
Use this to access the active report's metadata, e.g. its ID in AMP, its name, etc.public void setActiveAsset(Integer assetId) throws IllegalArgumentException, HttpErrorException, NotFoundException
submitAccessibilityConcernsToAMP(List)
is invoked, test results will be submitted to this active asset.
Make sure you first set the active organization for this asset prior to invoking this function using setActiveOrganization(Integer)
.assetId
- the ID of the AMP asset to make activeIllegalStateException
- if the active organization is not setIllegalArgumentException
- if the specified asset ID is nullHttpErrorException
- if an error is encountered while attempting to connect to AMP to validate the specified asset IDNotFoundException
- if the specified asset may not exist in the active AMP instance or is otherwise not accessiblepublic void setActiveModule(Integer moduleId) throws IllegalStateException, IllegalArgumentException, HttpErrorException, NotFoundException
submitAccessibilityConcernsToAMP(List)
is invoked, test results will be submitted to this active module.
Make sure you first set the active organization, asset, and report for this module prior to invoking this function using setActiveOrganization(Integer)
, setActiveAsset(Integer)
, and setActiveReport(Integer)
or setActiveReport(String)
, respectively.
While using AMPReportingService.ReportManagementStrategy.OVERWRITE
as your report management strategy, use setActiveModule(String, String)
instead of this method; see the documentation for AMPReportingService.ReportManagementStrategy.OVERWRITE
for details as to why.moduleId
- the ID of the AMP module to make activeIllegalStateException
- if the active organization, asset, or report is not setIllegalArgumentException
- if the specified module ID is nullHttpErrorException
- if an error is encountered while attempting to connect to AMP to validate the specified module IDNotFoundException
- if the specified module may not exist in the active AMP reportpublic Integer setActiveModule(String moduleName, String moduleLocation) throws IllegalStateException, IllegalArgumentException, HttpErrorException
submitAccessibilityConcernsToAMP(List)
is invoked.
The module name specified is validated if the active report already exists in AMP, but unlike setActiveModule(Integer)
, this method will not throw an exception if the specified module does not yet exist in AMP; it will be created next time submitAccessibilityConcernsToAMP(List)
is invoked.
Make sure you first set the active organization, asset, and report for this module prior to invoking this function using setActiveOrganization(Integer)
, setActiveAsset(Integer)
, and setActiveReport(Integer)
or setActiveReport(String)
, respectively.moduleName
- the name of the AMP module to make activemoduleLocation
- the name of the location in the website or app being tested; this can be a fully qualified URL, or simply a page title like "Login Page"IllegalStateException
- if the active organization, asset, or report is not setIllegalArgumentException
- if the specified module name or location is nullHttpErrorException
- if an error is encountered while attempting to connect to AMP to validate the specified module namepublic void setActiveModuleManagementStrategy(AMPReportingService.ModuleManagementStrategy moduleManagementStrategy)
submitAccessibilityConcernsToAMP(List)
is invoked.
Choosing the correct report and module management strategies to meet your business objectives is critical to using Continuum's AMP reporting functionality correctly, so please consult our support documentation for more information.moduleManagementStrategy
- the preferred management strategy to use when creating and editing AMP modulespublic void setActiveOrganization(Integer organizationId) throws IllegalArgumentException, HttpErrorException, NotFoundException
submitAccessibilityConcernsToAMP(List)
is invoked, test results will be submitted to this active organization.organizationId
- the ID of the AMP organization to make activeIllegalArgumentException
- if the specified organization ID is nullHttpErrorException
- if an error is encountered while attempting to connect to AMP to validate the specified organization IDNotFoundException
- if the specified organization may not exist in the active AMP instance or is otherwise not accessiblepublic void setActiveReport(Integer reportId) throws IllegalStateException, IllegalArgumentException, HttpErrorException, NotFoundException
submitAccessibilityConcernsToAMP(List)
is invoked, test results will be submitted to this active report.
Make sure you first set the active organization and asset for this report prior to invoking this function using setActiveOrganization(Integer)
and setActiveAsset(Integer)
, respectively.reportId
- the ID of the AMP report to make activeIllegalStateException
- if the active organization or asset is not setIllegalArgumentException
- if the specified report ID is nullHttpErrorException
- if an error is encountered while attempting to connect to AMP to validate the specified report IDNotFoundException
- if the specified report may not exist in the active AMP instance or is otherwise not accessiblepublic Integer setActiveReport(String reportName) throws IllegalStateException, IllegalArgumentException, HttpErrorException
submitAccessibilityConcernsToAMP(List)
is invoked.
The report name specified is validated, but unlike setActiveReport(Integer)
, this method will not throw an exception if the specified report does not yet exist in AMP; it will be created next time submitAccessibilityConcernsToAMP(List)
is invoked.
Make sure you first set the active organization and asset for this report prior to invoking this function using setActiveOrganization(Integer)
and setActiveAsset(Integer)
, respectively.reportName
- the name of the AMP report to make activeIllegalStateException
- if the active organization or asset is not setIllegalArgumentException
- if the specified report name is nullHttpErrorException
- if an error is encountered while attempting to connect to AMP to validate the specified report namepublic void setActiveReportManagementStrategy(AMPReportingService.ReportManagementStrategy reportManagementStrategy)
submitAccessibilityConcernsToAMP(List)
is invoked.
Choosing the correct report and module management strategies to meet your business objectives is critical to using Continuum's AMP reporting functionality correctly, so please consult our support documentation for more information.reportManagementStrategy
- the preferred management strategy to use when creating and editing AMP reportspublic boolean submitAccessibilityConcernsToAMP(List<AccessibilityConcern> accessibilityConcerns) throws NotFoundException, HttpErrorException
setActiveOrganization(Integer)
), asset (via setActiveAsset(Integer)
), report (via setActiveReport(Integer)
or setActiveReport(String)
), and module (via setActiveModule(Integer)
or setActiveModule(String, String)
) prior to invoking this function.
The active instance, organization, and asset must all already exist in AMP prior to invoking this function, otherwise an exception will be thrown; reports and modules don't need to exist in AMP yet, as they will be created if necessary.
Also, make sure to set your desired report and module management strategies prior to invoking this function using setActiveReportManagementStrategy(ReportManagementStrategy)
and setActiveModuleManagementStrategy(ModuleManagementStrategy)
, respectively, according to your use case.
Choosing the correct report and module management strategies to meet your business objectives is critical to using Continuum's AMP reporting functionality correctly, so please consult our support documentation for more information.accessibilityConcerns
- the list of accessibility concerns to submit to AMPIllegalStateException
- if the active instance, organization, asset, report, or module is not setHttpErrorException
- if an error is encountered while attempting to connect to AMP to validate the active organization, asset, report, or moduleNotFoundException
- if the active instance, organization, or asset may not exist in AMP as specified, or if an error occurs while attempting to create the necessary report or module in AMP (if applicable)Copyright © 2021. All rights reserved.