Please ask support questions on our Gitter
You can report bugs or request features on our GitHub issues page
If you submit a bug, please include your machine details (OS, browser version, etc.) and a reproducible set of steps.
Before submitting code, please discuss your proposed change on our Gitter or on the corresponding GitHub issue, if one exists already. Another person may be already working on your feature/fix and you may receive valuable feedback.
If your change is accepted, you may open up an issue on GitHub, describe your change in detail, and assign it to yourself.
When you're ready, please open up a pull request (PR) on GitHub. If you don't have push access yet, ask on Gitter and we'll grant it to you.
Thank you for your contribution!
- If your PR changes any behavior or fixes an issue, it should have an associated unit and/or functional test(s)
tests/core
contains mocha unit tests for smashtest's core functionalitytests/highlighting
contains a .smash file used to visually inspect syntax highlightingtests/packages
contains .smash and mocha tests for the built-in packages: web UI with selenium webdriver and REST APItests/reporter
contains .smash files used to visually inspect the live reportcli.js
andreporter.js
are currently manually tested. Please add manual test cases to the corresponding files (see "Manual tests" below)
- Please include JSDoc for all functions and classes
- Clone the project with
git clone https://github.com/smashtestio/smashtest.git
- In the top project directory, run
node ./src/cli.js
where you'd normally runsmashtest
. This will run your local code instead of the regular Smashtest.
- From the top project directory, run
mocha tests/core/*.js tests/packages/*.js
- Some unit tests are marked skipped. These tests have special requirements and need to be run individually from time to time.
- For code coverage, install
nyc
from npm, then runnpm test
. Reports will be available at/coverage/lcov-report/src/index.html
/coverage/lcov-report/packages/js/index.html
- Smashtest packages implement the built-in steps that handle browser automation with selenium webdriver, as well as REST APIs
- Functional tests for these packages are written in smash code itself
- From the top project directory, run
smashtest tests/packages/*.smash --groups=[browsers]
- Set
--groups
to the list of browsers you want to test in (e.g.,chrome,firefox,safari,ie,edge
)
- Set
cli.js
runs the command line prompt, and is currently manually tested. Since this file kicks off all other smashtest-related functions, testing it is also integration testing the whole app.- Manual test cases are stored in
tests/core/integration.smash
(core smash) andtests/packages/integration.smash
(integration with packages)
- Manual test cases are stored in
reporter.js
outputs the live report, and is also currently manually tested- To test, run
smashtest
on individual files intests/reporter
and visually inspect the reports that come out
- To test, run
- Some unit and functional tests are marked skipped. These tests are run individually from time to time. They each come with a comment with further details. Some of them are performance tests, others interfere with the code coverage tool, and other require a manual verification of a report and/or error.
- Smashtest comes with examples of both UI and API testing
- The comments at the top of
main.smash
(in both examples) contain valuable info - Run
smashtest
inside the directory of the example you want to run
Grammars provide syntax highlighting in code editors, and are stored in their own GitHub repos:
Please test changes you make to any of the grammars by opening up tests/highlighting/grammartest.smash
and visually inspecting it