website-spec is an E2E testing framework built upon JavaScript using Selenium. The language is designed to help improve the testing process when designing websites.
To begin using website-spec, the following must be installed on your machine:
- Eclipse IDE with modelling packages
- ChromeDriver or your own preferred browser's driver (Chrome is recommended)
- Mocha
In order to use website-spec, a web driver is required in order for automated testing to work. For this installation guide, ChromeDriver will be used. However, you can use whichever browser you deem necessary.
- To check your browser version, press the three dots in the upper right corner of your browser, and then press Settings. On the left hand side of the screen you should see a menu. Click on About Chrome. Your version will be displayed in this page.
- Navigate to this site and download the version of ChromeDriver corresponding to your browser's version.
- Upon completion of the download, place the driver's file in a location on your local disk.
- Add this location to your system path. This can be done on windows by opening the start menu, and typing Environment Variables. Open the first result and press the Environment Variables button. From here you can locate the PATH variable and add a rule to it.
Once these steps have been completed, ChromeDriver will be available to use on your computer. You can test this by opening a command prompt and typing chromedriver in the window.
In order for website-spec to function correctly, Mocha must be installed globally using the command below.
npm install --g mochaWhen using website-spec inside your runtime eclipse, an external tool will need to be created in order to run the language successfully.
- Go to External Tools -> External Tool Configurations
- Click on Program and click New Launch Configuration from the top left corner
- Locate where Mocha has been installed, this can be done by opening a command prompt and typing "where mocha"
- In location, paste the folder location and include the file "mocha.cmd" on the end, so it should look like "C:\path\to\mocha\mocha.cmd"
- In working directory, paste "${container_loc}", and in arguments, paste "${resource_name}"
- Press Apply
You should now be able to highlight run.js in your \src-gen folder and the test file should run.