Files
iTop/tests/php-unit-tests
odain-cbd c140ebcb6b N°7085 - Fix infinite loop in login page until fatal error occurs (#592)
* N°7085 - login page infinite loop until fatal error- add Config->AddAllowedLoginTypes

* N°7085 - reproduce issue via a test

* N°7085-fix infinite loop

* N°7085 - ci: fix config file rights in tearDown

* N°7085 - ci: fix config file rights in tearDown (again)

* N°7085 - ci: fix config file content

* N°7085 - ci : add runTestsInSeparateProcesses

* Update core/config.class.inc.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* N°7085 - exit -1 + enhance log message

* PR feedbacks from Romain regarding LoginTest annotations

---------

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
2024-01-12 08:13:40 +01:00
..
2023-11-15 11:14:07 +01:00
2023-11-15 11:14:07 +01:00

PHP unitary tests

Where should I add my test?

  • Covers an iTop PHP class or method?
    • Most likely in "unitary-tests".
  • Covers the consistency of some data through the app?
    • Most likely in "integration-tests".

Tips

Measure the time spent in a test

Simply cut'n paste the following line at several places within the test function:

if (isset($fStarted)) {echo 'L'.__LINE__.': '.round(microtime(true) - $fStarted, 3)."\n";} $fStarted = microtime(true);