libreoffice-online/cypress_test
Tamás Zolnai d87fab2acf cypress: Don't use hardcoded wsd hash.
Change-Id: Iff7296c6a9def8df9ddb6d78a29e0adf64436b7e
2020-01-22 12:55:13 +01:00
..
data cypress: Use env variable to get file path. 2020-01-21 16:13:01 +01:00
integration_tests cypress: Don't use hardcoded wsd hash. 2020-01-22 12:55:13 +01:00
plugins cypress: Use eslint to check coding conventions during build. 2020-01-21 16:13:01 +01:00
.eslintignore cypress: Use eslint to check coding conventions during build. 2020-01-21 16:13:01 +01:00
.gitignore cypress: Move plugins folder out of cypress subfolder 2020-01-21 16:13:01 +01:00
cypress.json cypress: Move general cypress options to cypress.json 2020-01-21 16:13:01 +01:00
Makefile.am cypress: Don't use hardcoded wsd hash. 2020-01-22 12:55:13 +01:00
package.json cypress: Use a better wait method for loolwsd server 2020-01-21 17:37:28 +01:00
README cypress: README: Add some installation \ test runner info. 2020-01-22 12:55:13 +01:00

Cypress based test framework for LibreOffice Online
====================================================

Installation
------------------
In most of the cases you need only cypress npm module
for running cypress tests. This is installed by the build
system, so running 'make check' will do the basic installation.
https://docs.cypress.io/guides/getting-started/installing-cypress.html#npm-install

For CI you might need install some additional dependencies:
https://docs.cypress.io/guides/guides/continuous-integration.html#Dependencies

Running tests
------------------

All tests are part of the make check build. So you can
just execute it from the root folder or under the
cypress_test folder to run cypress tests only.

    make check

To run cypress test cases selectively, you need to
go in to the cypress_test folder first and run one of
the following commands.

To run all desktop tests:

    make check-desktop

To run all mobile tests:

    make check-mobile

To run one specific test suit of desktop tests:

    make check-desktop spec=example_desktop_test_spec.js

To run one specific test suit of mobile tests:

    make check-mobile spec=toolbar_spec.js

To run one test case of a test suit you can use Mocha's
'only' feature. Just replace the it(...) function with
it.only(...) in the spec file for the selected test case
and run the test suit using the spec parameter (see above).
This 'only' feature affects both make check and make run
commands.

Openning interactive test runner
----------------------------------

Cypress has an interactive test runner application which
runs the test in the browser. So you can see the result of
the different steps your test makes in the browser. It's useful
during writing new tests or checking why an existing
test fails.
https://docs.cypress.io/guides/core-concepts/test-runner.html

To open desktop tests in the test runner:

    make run-desktop

To open mobile tests in the test runner:

    make run-mobile

During the build we run the tests with Chrome browser, so make sure
you select Chrome browser on the GUI while checking tests.
We are using different configuration and environment variables for
mobile and desktop tests, that's why there are two separate commands
for them and there is no option to open all the tests in the
test runner.