Create, manage, and close a scan session using Continuum Scripting Framework, your results will be pushed to the platform, ensuring seamless integration and access.
On this page:
- Prerequisites
- Create a scan session
- Add results to a session
- Close a scan session
- Required attributes for a test session
- Example XML configuration
- Submit your results to the platform
Prerequisites
Before starting, confirm you have the following:
- Node.js (version 10 or later)
- JRE (version 8 or later)
- Supported web browsers:
- Google Chrome
- Mozilla Firefox
- Microsoft Edge
- Mobile testing requirements:
- For Android: Android SDK tools (Android Studio recommended), ANDROID_HOME environment variable, and Google Chrome.
- For iOS: Xcode, Carthage (installable with Homebrew), and Google Chrome.
Create a scan session
Scan sessions test a website or applicable for accessibility issues.
To create a scan session, you need to:
Prepare a configuration file
Ensure your continuum.json file is correctly configured to push results to the Level Access Platform. Key settings include:
{
"platformBaseUrl": "https://platform.levelaccess.net",
"apiToken": "your-platform-api-token",
"worskpaceId": "12345",
"website/appId": "67890"
}
Replace:
- your-platform-api-token with your platform-specific API token.
- workspaceid and website/appId with the appropriate values for your account.
Define the test session in XML
Use the tests container to define session-level properties like URL, browser, and settings:
<tests url="https://example.com" browser="chrome">
<properties>
<platformBaseUrl>https://platform.levelaccess.net</platformBaseUrl>
<worskpaceId>12345</worskpaceId>
<website/appId>67890</website/appId>
<sessionDate>${TODAYS_DATE}</sessionDate>
</properties>
<test name="Accessibility Scan">
<!-- Instructions go here -->
</test>
</tests>
Run the session
Save the XML configuration as example.xml and execute it using the Continuum script executor:
continuum-script-executor example.xml
Add results to a session
Results are automatically generated and sent to the platform during the scan session.
Include a testing instruction
Use the testForAccessibility instruction to scan for issues and add them to the session:
<test name="Accessibility Scan">
<testForAccessibility maxPageCount="10" maxPageDepth="5" />
</test>
Check results
After the session runs, log into the Level Access Platform to review results under the specified organization and website/app.
Close a scan session
Close a session to send the results to platform. Results are only available in the platform after a scan session is closed.
Add a close instruction
Add a step at the end of your script to close the session:
<step name="Close Session">
<closeSession />
</step>
Run the updated script
Re-run the script to ensure the session is closed and results are submitted:
continuum-script-executor example.xml
Verify the session is closed
Log [into] in to the Level Access Platform and confirm that the session is marked as complete.
Required attributes for a test session
Each test session requires the following attributes:
- URL: The URL of the site or app being tested.
- Browser: The browser used for testing (chrome, firefox, or edge).
- platformBaseUrl: The URL for the Level Access Platform.
- workspaceId: Links results to the appropriate organization.
- website/appId: Stores results in the specified asset.
- sessionDate: A dynamic date variable for session tracking:
export TODAYS_DATE=$(date '+%Y-%m-%d')
Example XML configuration
Below is a complete example of an XML configuration for a scan session:
<tests url="https://example.com" browser="chrome">
<properties>
<platformBaseUrl>https://platform.levelaccess.net</platformBaseUrl>
<workspaceId>12345</workspaceId>
<website/appId>67890</website/appId>
<sessionDate>${TODAYS_DATE}</sessionDate>
</properties>
<test name="Accessibility Scan">
<testForAccessibility maxPageCount="10" maxPageDepth="5" />
<step name="Close Session">
<closeSession />
</step>
</test>
</tests>
Submit your results to the platform
Confirm your results are pushed to the Level Access Platform after the session:
- Log in to the Level Access Platform.
- Go to the specified workspace and app.
- Review the test session details and results.
Comments
0 comments
Article is closed for comments.