Difference between revisions of "Testing for a successful setup"

From Kraken Wiki
Jump to: navigation, search
(Running tests)
(Running tests)
 
(3 intermediate revisions by the same user not shown)
Line 30: Line 30:
 
*KrakenTools/tests/
 
*KrakenTools/tests/
 
*Cerberus/tests/
 
*Cerberus/tests/
*Cetus/tests/
 
 
*Ants/tests/
 
*Ants/tests/
 
*Ants/tests_with_cerberus/
 
*Ants/tests_with_cerberus/
 
*Kharon/tests/
 
*Kharon/tests/
 
*SuperFINIX/tests/
 
*SuperFINIX/tests/
 +
*Cetus/tests/
  
You can navigate to these test folders and run the tests using
+
At the moment, these tests may not be representative or well documented, but may provide you an initial idea on how the code works and if it works. You can navigate to these test folders and run the tests using
  
 
  python runTests.py
 
  python runTests.py
 +
 +
Note that '''running multiple sets of tests on the same computer at the same time will produce failures''' as solvers from multiple different test sets will try to connect to Cerberus using the same default port.
  
 
All of the tests should be completed successfully, i.e. you should see '''<tt>Test completed with exit code 0</tt>''' as the verdict for each test and a final result of '''<tt>All tests passed</tt>'''.
 
All of the tests should be completed successfully, i.e. you should see '''<tt>Test completed with exit code 0</tt>''' as the verdict for each test and a final result of '''<tt>All tests passed</tt>'''.

Latest revision as of 20:46, 5 February 2024

After going through the set up steps you can check for a successful installation with this approach.

Checking solver environment variables

Put the path of each solver into environment variables in the Kraken environment.

Test that the environment variable paths work in the Kraken environment by simply running (in the environment):

$ANTS_EXE_PATH

This should provide some output from Ants:

Usage: ants [OPTION] INPUT-FILE

You can similarly test

$SUPERFINIX_EXE_PATH
$KHARON_EXE_PATH

and

$SERPENT_EXE_PATH

if you have Serpent installed.

Running tests

Each of the solvers and the Python packages have their own folder containing some simple regression tests utilizing the testing module of KrakenTools:

  • KrakenTools/tests/
  • Cerberus/tests/
  • Ants/tests/
  • Ants/tests_with_cerberus/
  • Kharon/tests/
  • SuperFINIX/tests/
  • Cetus/tests/

At the moment, these tests may not be representative or well documented, but may provide you an initial idea on how the code works and if it works. You can navigate to these test folders and run the tests using

python runTests.py

Note that running multiple sets of tests on the same computer at the same time will produce failures as solvers from multiple different test sets will try to connect to Cerberus using the same default port.

All of the tests should be completed successfully, i.e. you should see Test completed with exit code 0 as the verdict for each test and a final result of All tests passed.

If you have any completely failed tests (Test terminated with exit code 1) you can check the output of that tests in

tests/workspace/<test_number>/test_output.txt

to try to diagnose the problem.

If you have tests timing out and the test output indicates that the test did not simply hang you can adjust the timeout in the runTests.py file.

These tests also function as simple showcases of many Kraken functionalities that might not be documented in tutorials in quite some time.

If your testing encounters any tests that simply refuse to successfully finish on your system, please report them to kraken@vtt.fi.