mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-16 10:21:23 +01:00
Added how to run all tests from CLI
parent
ccfcacee6b
commit
dde4091caa
@ -8,6 +8,7 @@ For instance, security test file in api loader section is like ``` api/src/loade
|
||||
In order to run a test, first of all you need to install PHPUnit on your dev machine. You can find the installation instruction [Here](https://phpunit.de/getting-started.html)
|
||||
|
||||
### Run a test in Cli
|
||||
|
||||
You can run tests with phpunit command in cli, which usually is running a test against a file to be tested:<br/>
|
||||
```phpunit --bootstrap [FileNeedsToBeTested] [RelativeTestFile]```<br/>
|
||||
For instance:<br/>
|
||||
@ -26,6 +27,21 @@ OK (31 tests, 812 assertions)
|
||||
|
||||
The above example shows that our security.php has been gone through 31 tests and 100% passed all of them.
|
||||
|
||||
You can run all tests for Egroupware using the phpunit command:<br/>
|
||||
```phpunit -c doc```<br/>
|
||||
```bash
|
||||
PHPUnit 5.7.4 by Sebastian Bergmann and contributors.
|
||||
|
||||
SSSS............................................................. 65 / 76 ( 85%)
|
||||
........... 76 / 76 (100%)
|
||||
|
||||
Time: 25.61 seconds, Memory: 30.00MB
|
||||
|
||||
OK, but incomplete, skipped, or risky tests!
|
||||
Tests: 76, Assertions: 1240, Skipped: 4.
|
||||
```
|
||||
4 tests were skipped in this case because of missing extensions.
|
||||
|
||||
### Run tests in Netbeans (V8+)
|
||||
It would be more convenient to be able to run all tests just by pressing one click. For that purpose we can configure PHPUnit test on egroupware's project inside Netbeans and tell the Netbeans to run all or a single test for us, pretty good right?.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user