Testing
On this page
Unit Testing
No content yet.
E2E (end to end) Testing
Currently E2E testing is only supported by Scifeon instances running from the SDK or on-premises Scifeon instances with the following setting in the appsettings.json:
{
...
"ScifeonSettings": {
"Instance": {
"AllowE2ETests": true
}
}
}
Prerequisites
- Node.js LTS. Download here (choose LTS)
- The latest version of Chrome. Download here
Running
- Get and unzip the E2E Testing project into a folder, e.g.
c:\e2e - Open a Command Prompt (
+R, typecmdand pressEnter) and enter:
cd c:\e2e
npm install
npm run build
node run.js --url http://{scifeon-instance-name}
See the tests running in the Chrome browser. NB: the npm install command only needs to be run the first time.
Options
The following options are available:
--url {scifeon_hostname}The Scifeon instance to test against--reportGenerate a test report in the/reportsfolder namedE2E_Test_Report_Scifeon_{scifeon_version}_{scifeon_hostname}.html--headlessRun the tests without launching the Chrome window--tag {tag(s)}Run only tests with specified tag(s) (separated by comma)
E.g. running only tests tagged readonly on the host http://localhost:5000, generating a report and running Chrome in headless mode:
node run.js --url http://localhost:5000 --tag readonly --headless --report