Automated testing for HTML5Accessibility.com
Перейти к файлу
dhbrett 926dcaedcb Improved perf in TestCaseResult 2016-07-29 09:59:29 -07:00
DriversExecutables Updating driver executables 2016-05-09 11:07:14 -07:00
Properties init 2016-03-15 15:16:08 -07:00
.gitattributes init 2016-03-15 15:16:08 -07:00
.gitignore Revert "Generate UIAutomationCore.dll dynamically now" 2016-04-13 14:45:59 -07:00
A11y.csproj Touching up changes from dev 2016-05-19 15:31:55 -07:00
A11y.sln Touching up changes from dev 2016-05-19 15:31:55 -07:00
DriverManager.cs Added screenshot ability and enabled for flaky tests 2016-06-16 10:36:00 -07:00
EdgeA11yTools.cs No longer using magic strings 2016-07-28 20:31:13 -07:00
EdgeStrategy.cs No longer using magic strings 2016-07-28 20:31:13 -07:00
ElementConverter.cs No longer using magic strings 2016-07-28 20:31:13 -07:00
Interop.UIAutomationCore.dll Added new dll with new UIA features 2016-04-19 15:37:29 -07:00
Javascript.cs Made input validation more resilient 2016-06-14 10:56:56 -07:00
Program.cs No longer using magic strings 2016-07-28 20:31:13 -07:00
README.md Update README.md 2016-06-22 15:03:17 -07:00
TestCaseResult.cs Improved perf in TestCaseResult 2016-07-29 09:59:29 -07:00
TestData.cs No longer using magic strings 2016-07-28 20:31:13 -07:00
TestStrategy.cs No longer using magic strings 2016-07-28 20:31:13 -07:00
diff_runs.ps1 Added posh script to diff runs 2016-05-02 11:39:10 -07:00
license.txt Added license 2016-04-21 10:29:46 -07:00
packages.config init 2016-03-15 15:16:08 -07:00
run.ps1 Fixing typo in run.ps1 2016-05-18 09:43:48 -07:00

README.md

A11y Automation Test Suite

An automated implementation of html5accessibility.com for Microsoft Edge.

Running

If you have Visual Studio, simply open A11y.sln and run.

Otherwise you can build and run in one step by calling run.ps1 within PowerShell.

Building and running manually

It's also possible to run manually without Visual Studio or PowerShell.

First navigate to the project's root directory and install nuget: powershell "(new-object net.webclient).DownloadFile('https://nuget.org/nuget.exe', 'nuget.exe')"

Then restore the packages: nuget.exe restore A11y.sln

Finally find MSBuild.exe, which comes pre-installed with the .NET framework. It will be in the C:\Windows\Microsoft.NET\Framework folder. For example: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe. Make sure to use the version installed on your computer.

Use MSBuild to compile the solution: C:\Windows\Microsoft.NET\Framework\<VERSION ON YOUR PC>\MSBuild.exe A11y.sln

Then just run the compiled program: bin\Debug\Microsoft.Edge.A11y.exe

Scores and reporting

For a full explanation of how scores are calculated, see html5accessibility.com.

After the tests have run, the results are printed to the console and saved in the root directory of the project with the name "scores.csv".

Testing your site

It's possible to use A11y to automate testing of your site as well. A sample project is included on the site_testing branch.

Test files

The sample test page is included in this repo on the site_testing branch. It's possible (and better) to have your sites in another location. Just change the constructor call to to the TestStrategy class passing in the base URL where your test files are located.

Pass and failure conditions

The TestData.cs file contains the logic of the tests and an explanation of the built-in tests. To add your own tests, add a TestData object for each test you want to run.

By default, elements are found by their control type, but you can pass in a custom method of searching by adding a searchStrategy parameter.

In addition to the default tests, you can use the additionalRequirement paramter to specify any other requirement that you want to verify. If you find yourself using the same additionalRequirement for many of your tests, you may want to add another parameter to the TestData constructor to simplify testing that requirement.

Contributing

We want your feedback and your help! If you have any suggestions, file an issue and we can figure out how to get your needs met.

If you'd like to submit code changes, the best thing to do is to file an issue first so we can talk about whether the change would fit with the direction and purpose of the project. Even if your changes don't fit with the general purpose of A11y, we'd love to see you fork the project to do new things with it.

You will need to complete a Contributor License Agreement (CLA) before your pull request can be accepted. This agreement testifies that you are granting us permission to use the source code you are submitting, and that this work is being submitted under appropriate license that we can use it. The process is very simple as it just hooks into your Github account. Once we have received the signed CLA, we'll review the request. You will only need to do this once.

##Code of Conduct This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.