Skip to content

Commit 5992a24

Browse files
committed
Update readme to reflect command excution
1 parent fa02a52 commit 5992a24

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

README.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,25 @@ All possible attributes that can be mocked are listed below:
4545

4646
### Execute Shell command
4747

48-
TODO
48+
Fibs gives you also ability to run any shell command on macOS from UI test target.
49+
This could be useful for running special mocking scripts that modifies your tested system.
50+
To run shell command hit `localhost:8080/command`, example cURL:
51+
```bash
52+
curl -v\
53+
-X POST\
54+
-H "Content-Type: application/json"\
55+
-H "Accept: application/json"\
56+
-d "{ \"command\": \"echo 'Hello World'\"}"\
57+
"localhost:8080/command"
58+
```
59+
Parameters of such call are:
60+
- `command` - raw string command that you want to run on hosting system
61+
62+
Also, response for this request is synchronous, which means you can later process it back in UITests target.
63+
For the request above, the response would be:
64+
```bash
65+
{"raw_response":"Hello World"}
66+
```
4967

5068
## Instalation
5169

@@ -57,4 +75,4 @@ pod 'Fibs'
5775

5876
### Brew
5977

60-
TODO
78+
TODO

0 commit comments

Comments
 (0)