Testing
Unit Testing
Section titled “Unit Testing”No content yet.
E2E (end to end) Testing
Section titled “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
Section titled “Prerequisites”- Node.js LTS. Download here (choose LTS)
- The latest version of Chrome. Download here
Running
Section titled “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:\e2enpm installnpm run buildnode 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
Section titled “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