GUI Tests
File structure
We use Cypress for GUI tests along with Cucumber
All the GUI tests could be found in
__tests__/guifolderThe test steps are in the
.featurefiles and the test step definitions are in the.jsfiles in the folder that shares the same name as the.featurefileFor example the step definitions of
facility_modal.featureneed to be in thefacility_modalfolder(name of the js files are not important)
We intercept all the requests and respond with local data. The data for each test are kept in json files in the folder of the corresponding test.
Running the tests
Start the project
In a new terminal running
yarn cypress:openwill open the cypress window.In the cypress window you can see all the e2e and gui tests and by clicking on any of it you can start testing
Without opening the cypress window, there are 2 ways to run the gui tests
yarn cypress:guiruns all the gui tests and saves their result in cypress dashboardyarn cypress:gui-localruns all the gui tests without saving anything to the cypress dashboard. While working locally, this script should be used to prevent exceeding dashboard monthly test quota
Cypress dashboard
The credentials for the dashboard could be found in OpenUp general credentials file
Everytime
cypress:guiscript is run, the test results, logs and their videos are saved to the dashboard. Github actions runs this script too.By selecting
WazimapNGin the Projects page, all the latest test runs could be viewed.


By clicking on any of the test runs, you can view
Overview : How many tests are failed / passed / skipped.... etc
Test results : Details, statuses, result logs... etc
Specs : Screenshots, videos... etc

More useful details(Average run duration, Top failures, Slowest tests...) could be found in Analytics menu of the dashboard.
Last updated
Was this helpful?