@@ -54,7 +54,7 @@ Write the tests in a CSV file ready for import.
54
54
55
55
Default options are:
56
56
57
- - rows: ` 5 `
57
+ - rows: ` null ` (all the tests)
58
58
- file: ` phpunit_results.csv `
59
59
60
60
## Json
@@ -67,7 +67,7 @@ Write the tests in a JSON file ready for import.
67
67
68
68
Default options are:
69
69
70
- - rows: ` 5 `
70
+ - rows: ` null ` (all the tests)
71
71
- file: ` phpunit_results.json `
72
72
73
73
### MySQL
@@ -80,7 +80,7 @@ Store the test name and the time into a MySQL database. It will override existin
80
80
81
81
Default credentials are (as array):
82
82
83
- - rows: ` 5 `
83
+ - rows: ` null ` (all the tests)
84
84
- database: ` phpunit_results `
85
85
- table: ` default `
86
86
- username: ` root `
@@ -97,10 +97,52 @@ Store the test name and the time into a SQLite database. It will override existi
97
97
98
98
Default credentials are (as array):
99
99
100
- - rows: ` 5 `
100
+ - rows: ` null ` (all the tests)
101
101
- database: ` phpunit_results.db `
102
102
- table: ` default `
103
103
104
+ ## Arguments
105
+
106
+ To override the default configuration per extension, you need to use ` <arguments> ` in your ` phpunit.xml ` file
107
+
108
+ ``` xml
109
+ <extension class =" Lloople\PHPUnitExtensions\Runners\SlowestTests\Json" >
110
+ <arguments >
111
+ <integer >10</integer >
112
+ <string >phpunit_results_as_json.json</string >
113
+ </arguments >
114
+ </extension >
115
+ ```
116
+
117
+ In the case of the MySQL and SQLite, which needs a database connection, configuration goes as array
118
+
119
+ <extension class =" Lloople\PHPUnitExtensions\Runners\SlowestTests\MySQL " >
120
+ <arguments >
121
+ <null/> <!-- This allows you to log all the tests -->
122
+ <array>
123
+ <element key="database">
124
+ <string>my_phpunit_results</string>
125
+ </element>
126
+ <element key="table">
127
+ <string>project1_test_results</string>
128
+ </element>
129
+ <element key="username">
130
+ <string>homestead</string>
131
+ </element>
132
+ <element key="password">
133
+ <string>secret</string>
134
+ </element>
135
+ <element key="host">
136
+ <string>192.168.12.14</string>
137
+ </element>
138
+ </array>
139
+ </arguments >
140
+ </extension >
141
+ ```
142
+
143
+ You don't need to override those credentials that already fit to your
144
+ usecase, since the class will merge your configuration with the default one
145
+
104
146
### Changelog
105
147
106
148
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
0 commit comments