Skip to content

Commit 8c6d426

Browse files
committed
update README
1 parent 2a2578e commit 8c6d426

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,32 @@ details.
1212
Usage
1313
----------
1414

15-
TestingBot-PHP is distributed with Composer, which means you can include it in your project by adding `testingbot-php` to your composer.json
15+
TestingBot-PHP is distributed with Composer, which means you can include it in your project:
1616

17+
`composer require testingbot/testingbot-php`
18+
19+
or edit the `composer.json` file and add:
20+
21+
```json
22+
{
23+
"require": {
24+
"testingbot/testingbot-php": ">=1.0.0"
25+
}
26+
}
27+
```
28+
29+
To start, create a new `TestingBot\TestingBotAPI` object and pass in the key and secret you obtained from [TestingBot](https://testingbot.com/members/user/edit)
30+
31+
```php
32+
$api = new TestingBot\TestingBotAPI($key, $secret);
33+
```
34+
35+
Now you can use the various methods we've made available to interact with the API:
36+
37+
### updateJob
38+
Updates a Test with Meta-data to display on TestingBot.
39+
For example, you can specify the test name and whether the test succeeded or failed:
40+
41+
```php
42+
$api->updateJob($webdriverSessionID, array('name' => 'mytest', 'success' => true));
43+
```

0 commit comments

Comments
 (0)