public class Continuum extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Continuum.LinkSource |
static class |
Continuum.MobileType
Defines the type of mobile testing environment, i.e.
|
static class |
Continuum.TestContext
Defines the type of testing environment, i.e.
|
Constructor and Description |
---|
Continuum() |
Modifier and Type | Method and Description |
---|---|
List<AccessibilityConcern> |
getAccessibilityConcerns()
Gets the list of accessibility concerns found by Access Engine during the last test execution.
|
String |
getAccessibilityConcernsPrettyPrinted()
Gets a pretty-printed String of accessibility concerns found by Access Engine during the last test execution.
|
AMPReportingService |
getAMPReportingService()
Gets the instance of the AMP reporting service associated with this instance of Continuum.
|
List<Assertion> |
getAssertions() |
String |
getAssertionsPrettyPrinted() |
boolean |
getIncludePotentialAccessibilityConcerns()
Gets whether or not accessibility concerns that require manual review are included in any of Continuum's test results.
|
boolean |
getScanWebViews()
Gets whether or not Continuum should scan for accessibility concerns in the content of any visible web views.
|
Map<Integer,String> |
getSupportedBestPractices()
Gets a map of IDs of best practices (defined in AMP and supported by Continuum) to their descriptions for the current test context and mobile type used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) . |
Map<Integer,String> |
getSupportedStandards()
Gets a map of IDs of accessibility standards (defined in AMP and supported by Continuum) to their names for the current test context and mobile type used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) . |
Map<Integer,String> |
getSupportedTests()
Gets a map of IDs of automatic Access Engine tests (supported by Continuum) to their descriptions for the current test context and mobile type used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) . |
com.bettercloud.vault.Vault |
getVault()
Gets the instance of the Vault object that can be used to interface with the HashiCorp Vault instance specified by the VAULT_ADDR environment variable.
|
Set<String> |
harvestLinks()
Harvests and returns the links from the current page that are found in <a> tags.
|
Set<String> |
harvestLinks(Continuum.LinkSource... linkSources)
Harvests and returns the links from the current page that are found in the specified source(s).
|
List<ContentBlock> |
identifyContentBlocks() |
List<AccessibilityConcern> |
runAllTests()
Runs all automatic Access Engine tests against the current page, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) . |
List<Assertion> |
runAllTestsForAssertions() |
List<AccessibilityConcern> |
runAllTestsOnNode(String selectorForNodeToTest)
Runs all automatic Access Engine tests against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) and the specified CSS (if testing a website) or Appium XPath selector (if testing a mobile app). |
List<AccessibilityConcern> |
runTests(Integer[] engineTestIds)
Runs only the specified automatic Access Engine tests against the current page, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) and, for specific test IDs, AMP. |
List<AccessibilityConcern> |
runTestsOnNode(Integer[] accessEngineTestIds,
String selectorForNodeToTest)
Runs only the specified automatic Access Engine tests against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) and, for specific test IDs, AMP. |
void |
setIncludePotentialAccessibilityConcerns(boolean includePotentialAccessibilityConcerns)
Globally sets whether or not accessibility concerns that require manual review are included in any of Continuum's test results.
|
void |
setScanWebViews(boolean scanWebViews)
Globally sets whether or not Continuum scans for accessibility concerns in the content of any visible web views.
|
void |
setUp(org.openqa.selenium.WebDriver webDriver)
Sets up Continuum for web testing.
|
void |
setUp(org.openqa.selenium.WebDriver webDriver,
Continuum.TestContext context)
Sets up Continuum for web or mobile testing.
|
List<AccessibilityConcern> |
testForBestPractices(Integer[] bestPracticeIds)
Runs only the automatic Access Engine tests corresponding to the specified best practices against the current page, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) and, for specific best practice IDs, AMP. |
List<AccessibilityConcern> |
testForNoticeability(Integer minNoticeability)
Runs only the automatic Access Engine tests of or greater than the specified noticeability against the current page, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) . |
List<AccessibilityConcern> |
testForSeverity(Integer minSeverity)
Runs only the automatic Access Engine tests of or greater than the specified severity against the current page, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) . |
List<AccessibilityConcern> |
testForStandards(Integer[] standardIds)
Runs only the automatic Access Engine tests corresponding to the specified accessibility standards against the current page, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) and, for specific accessibility standard IDs, AMP. |
List<AccessibilityConcern> |
testForTractability(Integer minTractability)
Runs only the automatic Access Engine tests of or greater than the specified tractability against the current page, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) . |
List<AccessibilityConcern> |
testNodeForBestPractices(Integer[] bestPracticeIds,
String selectorForNodeToTest)
Runs only the automatic Access Engine tests corresponding to the specified best practices against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) and, for specific best practice IDs, AMP. |
List<AccessibilityConcern> |
testNodeForNoticeability(Integer minNoticeability,
String selectorForNodeToTest)
Runs only the automatic Access Engine tests of or greater than the specified noticeability against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) . |
List<AccessibilityConcern> |
testNodeForSeverity(Integer minSeverity,
String selectorForNodeToTest)
Runs only the automatic Access Engine tests of or greater than the specified severity against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) . |
List<AccessibilityConcern> |
testNodeForStandards(Integer[] standardIds,
String selectorForNodeToTest)
Runs only the automatic Access Engine tests corresponding to the specified accessibility standards against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) and, for specific accessibility standard IDs, AMP. |
List<AccessibilityConcern> |
testNodeForTractability(Integer minTractability,
String selectorForNodeToTest)
Runs only the automatic Access Engine tests of or greater than the specified tractability against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke
setUp(WebDriver) or setUp(WebDriver, TestContext) . |
public List<AccessibilityConcern> getAccessibilityConcerns()
public String getAccessibilityConcernsPrettyPrinted()
public AMPReportingService getAMPReportingService()
public String getAssertionsPrettyPrinted()
public boolean getIncludePotentialAccessibilityConcerns()
AccessibilityConcern.getNeedsReview()
return true.
By default, this is specified by Configuration.getIncludePotentialAccessibilityConcerns()
, i.e. the value for the 'includePotentialAccessibilityConcerns' attribute defined in continuum.json.
This setting can be toggled programmatically using setIncludePotentialAccessibilityConcerns(boolean)
, overriding the value specified in continuum.json.public boolean getScanWebViews()
AccessibilityConcern.getTestContext()
return Continuum.TestContext.WEB
.
This setting is only applicable to mobile app testing, i.e. when setUp(WebDriver, TestContext)
is invoked with Continuum.TestContext.NATIVEAPP
.
(Native mobile testing is restricted to licensed Continuum Mobile users only; this functionality is not available in the Community edition of Continuum.)
By default, this is specified by Configuration.Mobile.getScanWebViews()
()}, i.e. the value for the 'scanWebViews' attribute of the 'mobile' object defined in continuum.json.
This setting can be toggled programmatically using setScanWebViews(boolean)
, overriding the value specified in continuum.json.public Map<Integer,String> getSupportedBestPractices()
setUp(WebDriver)
or setUp(WebDriver, TestContext)
.
Make sure to invoke one of the setUp methods before invoking this method.
If a connection to AMP could not be established when best practice data was fetched from AMP, i.e. when Continuum was instantiated, this will return an empty map.public Map<Integer,String> getSupportedStandards()
setUp(WebDriver)
or setUp(WebDriver, TestContext)
.
Make sure to invoke one of the setUp methods before invoking this method.
If a connection to AMP could not be established when best practice data was fetched from AMP, i.e. when Continuum was instantiated, this will return an empty map.public Map<Integer,String> getSupportedTests()
setUp(WebDriver)
or setUp(WebDriver, TestContext)
.
Make sure to invoke one of the setUp methods before invoking this method.public com.bettercloud.vault.Vault getVault()
public Set<String> harvestLinks()
public Set<String> harvestLinks(Continuum.LinkSource... linkSources)
linkSources
- public List<ContentBlock> identifyContentBlocks()
public List<AccessibilityConcern> runAllTests()
setUp(WebDriver)
or setUp(WebDriver, TestContext)
.
Make sure to invoke one of the setUp methods before invoking this method.public List<AccessibilityConcern> runAllTestsOnNode(String selectorForNodeToTest)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
and the specified CSS (if testing a website) or Appium XPath selector (if testing a mobile app).
Make sure to invoke one of the setUp methods before invoking this method.selectorForNodeToTest
- a CSS (if testing web) or Appium XPath (if testing mobile) selector to restrict accessibility testing topublic List<AccessibilityConcern> runTests(Integer[] engineTestIds)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
and, for specific test IDs, AMP.
Make sure to invoke one of the setUp methods before invoking this method.engineTestIds
- the IDs of the automatic Access Engine tests to test for (invoke getSupportedTests()
for a list of these, or consult AMP)public List<AccessibilityConcern> runTestsOnNode(Integer[] accessEngineTestIds, String selectorForNodeToTest)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
and, for specific test IDs, AMP.
Make sure to invoke one of the setUp methods before invoking this method.accessEngineTestIds
- the IDs of the automatic Access Engine tests to test for (invoke getSupportedTests()
for a list of these, or consult AMP)selectorForNodeToTest
- a CSS (if testing web) or Appium XPath (if testing mobile) selector to restrict accessibility testing topublic void setIncludePotentialAccessibilityConcerns(boolean includePotentialAccessibilityConcerns)
AccessibilityConcern.getNeedsReview()
return true.
Using this method will override the value for the 'includePotentialAccessibilityConcerns' attribute defined in continuum.json, which is otherwise used by default.
This method is only available in the Pro edition of Continuum.includePotentialAccessibilityConcerns
- true if accessibility concerns that require manual review should be included in any of Continuum's test results, false if they should notpublic void setScanWebViews(boolean scanWebViews)
AccessibilityConcern.getTestContext()
return Continuum.TestContext.WEB
.
This setting is only applicable to mobile app testing, i.e. when setUp(WebDriver, TestContext)
is invoked with Continuum.TestContext.NATIVEAPP
.
(Native mobile testing is restricted to licensed Continuum Mobile users only; this functionality is not available in the Community edition of Continuum.)
Using this method will override the value for the 'scanWebViews' attribute of the 'mobile' object defined in continuum.json, which is otherwise used by default.scanWebViews
- true if the scanning of web views for accessibility concerns is desired, false if it is notpublic void setUp(org.openqa.selenium.WebDriver webDriver)
setUp(WebDriver, TestContext)
instead.webDriver
- a Selenium web driver to test withpublic void setUp(org.openqa.selenium.WebDriver webDriver, Continuum.TestContext context)
webDriver
- a Selenium (if testing web) or Appium (if testing mobile) web driver to test withcontext
- the test context, i.e. either web or mobilepublic List<AccessibilityConcern> testForBestPractices(Integer[] bestPracticeIds)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
and, for specific best practice IDs, AMP.
Make sure to invoke one of the setUp methods before invoking this method.bestPracticeIds
- the IDs of the best practices to test for (invoke getSupportedBestPractices()
for a list of these, or consult AMP)public List<AccessibilityConcern> testForNoticeability(Integer minNoticeability)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
.
Make sure to invoke one of the setUp methods before invoking this method.minNoticeability
- the inclusive minimum noticeability of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least noticeable and 10 is the most noticeableminNoticeability
public List<AccessibilityConcern> testForSeverity(Integer minSeverity)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
.
Make sure to invoke one of the setUp methods before invoking this method.minSeverity
- the inclusive minimum severity of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least severe and 10 is the most severeminSeverity
public List<AccessibilityConcern> testForStandards(Integer[] standardIds)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
and, for specific accessibility standard IDs, AMP.
Note that the IDs of the specified accessibility standards must also be specified by Configuration.getDefaultStandardIds()
, i.e. in the set of IDs implied from the value of the 'getDefaultStandardIds' attribute defined in continuum.json, otherwise no accessibility concerns will be returned.
Make sure to invoke one of the setUp methods before invoking this method.standardIds
- the IDs of the accessibility standards to test for (invoke getSupportedStandards()
for a list of these, or consult AMP)public List<AccessibilityConcern> testForTractability(Integer minTractability)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
.
Make sure to invoke one of the setUp methods before invoking this method.minTractability
- the inclusive minimum tractability of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least tractable and 10 is the most tractableminTractability
public List<AccessibilityConcern> testNodeForBestPractices(Integer[] bestPracticeIds, String selectorForNodeToTest)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
and, for specific best practice IDs, AMP.
Make sure to invoke one of the setUp methods before invoking this method.bestPracticeIds
- the IDs of the best practices to test for (invoke getSupportedBestPractices()
for a list of these, or consult AMP)selectorForNodeToTest
- a CSS (if testing web) or Appium XPath (if testing mobile) selector to restrict accessibility testing topublic List<AccessibilityConcern> testNodeForNoticeability(Integer minNoticeability, String selectorForNodeToTest)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
.
Make sure to invoke one of the setUp methods before invoking this method.minNoticeability
- the inclusive minimum noticeability of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least noticeable and 10 is the most noticeableselectorForNodeToTest
- a CSS (if testing web) or Appium XPath (if testing mobile) selector to restrict accessibility testing tominSeverity
public List<AccessibilityConcern> testNodeForSeverity(Integer minSeverity, String selectorForNodeToTest)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
.
Make sure to invoke one of the setUp methods before invoking this method.minSeverity
- the inclusive minimum severity of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least noticeable and 10 is the most noticeableselectorForNodeToTest
- a CSS (if testing web) or Appium XPath (if testing mobile) selector to restrict accessibility testing tominSeverity
public List<AccessibilityConcern> testNodeForStandards(Integer[] standardIds, String selectorForNodeToTest)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
and, for specific accessibility standard IDs, AMP.
Note that the IDs of the specified accessibility standards must also be specified by Configuration.getDefaultStandardIds()
, i.e. in the set of IDs implied from the value of the 'getDefaultStandardIds' attribute defined in continuum.json, otherwise no accessibility concerns will be returned.
Make sure to invoke one of the setUp methods before invoking this method.standardIds
- the IDs of the accessibility standards to test for (invoke getSupportedStandards()
for a list of these, or consult AMP)selectorForNodeToTest
- a CSS (if testing web) or Appium XPath (if testing mobile) selector to restrict accessibility testing topublic List<AccessibilityConcern> testNodeForTractability(Integer minTractability, String selectorForNodeToTest)
setUp(WebDriver)
or setUp(WebDriver, TestContext)
.
Make sure to invoke one of the setUp methods before invoking this method.minTractability
- the inclusive minimum tractability of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least noticeable and 10 is the most noticeableselectorForNodeToTest
- a CSS (if testing web) or Appium XPath (if testing mobile) selector to restrict accessibility testing tominSeverity
Copyright © 2021. All rights reserved.