Skip to content

Commit 67ec1cb

Browse files
committed
README readability improvements
1 parent d7bf058 commit 67ec1cb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
[![Build Status](https://travis-ci.org/johnkary/phpunit-speedtrap.svg?branch=master)](https://travis-ci.org/johnkary/phpunit-speedtrap)
44

5-
SpeedTrap reports on slow-running tests in your PHPUnit test suite right in your console.
5+
SpeedTrap reports on slow-running PHPUnit tests right in the console.
66

7-
Many factors affect test execution time. A test not properly isolated from variable latency (database, network, etc.) and even basic load on your test machine will cause test times to fluctuate.
7+
Many factors affect test execution time. A test not properly isolated from variable latency (database, network, etc.) and even basic load on the test machine will cause test execution times to fluctuate.
88

9-
SpeedTrap helps you **identify slow tests** but cannot tell you **why** those tests are slow. For that you should check out [Blackfire.io](https://blackfire.io) for easy profiling your test suite, or another PHPUnit listener [PHPUnit\_Listener\_XHProf](https://github.com/sebastianbergmann/phpunit-testlistener-xhprof), to help identify specifically which methods in your call stack are slow.
9+
SpeedTrap helps **identify slow tests** but cannot explain **why** those tests are slow. For that consider using [Blackfire.io](https://blackfire.io) to profile the test suite, or another PHPUnit listener [PHPUnit\_Listener\_XHProf](https://github.com/sebastianbergmann/phpunit-testlistener-xhprof), to specifically identify slow code.
1010

1111
![Screenshot of terminal using SpeedTrap](http://i.imgur.com/Zr34giR.png)
1212

@@ -19,7 +19,7 @@ SpeedTrap is installable via [Composer](http://getcomposer.org) and should be ad
1919

2020
## Usage
2121

22-
Enable with all defaults by adding the following to your test suite's `phpunit.xml` file:
22+
Enable with all defaults by adding the following code to your project's `phpunit.xml` file:
2323

2424
```xml
2525
<phpunit bootstrap="vendor/autoload.php">
@@ -30,7 +30,7 @@ Enable with all defaults by adding the following to your test suite's `phpunit.x
3030
</phpunit>
3131
```
3232

33-
Now run your test suite as normal. If tests run that exceed the slowness threshold (500ms by default), SpeedTrap will report on them in the console after the suite completes.
33+
Now run the test suite as normal. If one or more test executions exceed the slowness threshold (500ms by default), SpeedTrap will report on those tests in the console after all tests have completed.
3434

3535
## Configuration
3636

@@ -62,13 +62,13 @@ These configuration parameters are set in `phpunit.xml` when adding the listener
6262
</phpunit>
6363
```
6464

65-
This allows you to set your own criteria for "slow" tests, and how many you care to know about.
65+
This allows customizing what the project considers a "slow" test and how many are reported on to project maintainers.
6666

67-
## Custom slow threshold per-test method
67+
## Custom slowness threshold per-test case
6868

69-
You may have a few tests in your suite that take a little bit longer to run, and want to have a higher slow threshold than the rest of your suite.
69+
Some projects have a few complex tests that take a long time to run. It is possible to set a different slowness threshold for individual test cases.
7070

71-
You can use the annotation `@slowThreshold` to set a custom slow threshold on a per-test method basis. This number can be higher or lower than the default threshold and will be used in place of the default threshold for that specific test.
71+
Use the annotation `@slowThreshold` to set a custom slowness threshold for single test cases. This number may be higher or lower than the default threshold and will be used in place of the default threshold for that specific test.
7272

7373
```php
7474
class SomeTestCase extends \PHPUnit_Framework_TestCase
@@ -78,7 +78,7 @@ class SomeTestCase extends \PHPUnit_Framework_TestCase
7878
*/
7979
public function testLongRunningProcess()
8080
{
81-
// Code to exercise your long-running SUT
81+
// Code that takes a longer time to execute
8282
}
8383
}
8484
```

0 commit comments

Comments
 (0)