2020-01-12 05:27:59 -06:00
|
|
|
Cypress based test framework for LibreOffice Online
|
|
|
|
====================================================
|
|
|
|
|
|
|
|
Running tests
|
|
|
|
------------------
|
|
|
|
|
|
|
|
All tests are part of the make check build. So you can
|
2020-01-14 07:19:06 -06:00
|
|
|
just execute it from the root folder or under the
|
|
|
|
cypress_test folder to run cypress tests only.
|
2020-01-12 05:27:59 -06:00
|
|
|
|
|
|
|
make check
|
|
|
|
|
2020-01-14 07:19:06 -06:00
|
|
|
To run cypress test cases selectively, you need to start loolwsd
|
2020-01-13 13:20:30 -06:00
|
|
|
server first. To do that you can call make run on a separate
|
|
|
|
command line window, so LibreOffice online is started.
|
|
|
|
|
2020-01-14 07:19:06 -06:00
|
|
|
After the server is running you can execute the tests,
|
2020-01-13 13:20:30 -06:00
|
|
|
calling the given run command. You need to run the
|
|
|
|
command under cypress_test\ folder.
|
|
|
|
|
2020-01-12 05:27:59 -06:00
|
|
|
To run all desktop tests:
|
|
|
|
|
2020-01-14 12:37:17 -06:00
|
|
|
make check-desktop
|
2020-01-12 05:27:59 -06:00
|
|
|
|
|
|
|
To run all mobile tests:
|
|
|
|
|
2020-01-14 12:37:17 -06:00
|
|
|
make check-mobile
|
2020-01-12 05:27:59 -06:00
|
|
|
|
2020-01-13 13:20:30 -06:00
|
|
|
To run one specific test suit of desktop tests:
|
|
|
|
|
|
|
|
npm run cyrun_desktop --spec example_desktop_test_spec.js
|
|
|
|
|
|
|
|
To run one specific test suit of mobile tests:
|
|
|
|
|
|
|
|
npm run cyrun_mobile --spec toolbar_spec.js
|
|
|
|
|
2020-01-12 05:27:59 -06:00
|
|
|
You can also open cypress tests in the browser, so you can
|
|
|
|
check what happens during test run. It's useful for writing
|
|
|
|
new tests or checking why an existing test fails.
|
|
|
|
|
|
|
|
To open desktop tests in browser:
|
|
|
|
|
|
|
|
npm run cyopen_desktop
|
|
|
|
|
|
|
|
To open mobile tests in browser:
|
|
|
|
|
|
|
|
npm run cyopen_mobile
|
2020-01-13 13:20:30 -06:00
|
|
|
|
|
|
|
During the build we run the tests with Chrome browser, so make sure
|
|
|
|
you select Chrome browser on the GUI while checking tests.
|