You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Testing.md
+46-1Lines changed: 46 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,16 +14,24 @@ You can also run those steps independently or on a more fine-grained way.
14
14
15
15
### Automated tests
16
16
17
-
Make sure to run the automated tests using `bundle exec` to ensure you’re running the correct version of `rspec` and `rubocop`
17
+
Make sure to run the automated tests using `bundle exec` to ensure you’re running the correct version of `rspec` and `rubocop`.
18
18
19
19
#### All unit tests
20
20
21
21
First, navigate into the root of the _fastlane_ project and run all unit tests using
22
22
23
+
```
24
+
bundle exec rake test_all
25
+
```
26
+
27
+
You can also invoke rspec directly
28
+
23
29
```
24
30
bundle exec rspec
25
31
```
26
32
33
+
The test execution sends all standard output to a random temporary file. Prefix the command line with `DEBUG= ` to print out the output instead. E.g. `DEBUG= bundle exec rspec`
34
+
27
35
#### Unit tests for one specific tool
28
36
29
37
If you want to run tests only for one tool, use
@@ -54,6 +62,43 @@ The number is the line number of the unit test (`it ... do`) or unit test group
54
62
55
63
Instead of using the line number you can also use a filter with the `it "something", now: true` notation and then use `bundle exec rspec -t now` to run this tagged test. (Note that `now` can be any random string of your choice.)
56
64
65
+
#### Ensuring all tests run independently
66
+
67
+
If you want to check if all the tests in the test suite can be run independently, use
68
+
69
+
```
70
+
bundle exec rake test_all_individually
71
+
```
72
+
73
+
#### Troubleshoot flickering tests
74
+
75
+
If your tests fail randomly, pass extra arguments to `test_all` and `test_all_individually` using the environment variable `RSPEC_ARGS` to isolate the test failures and reproduce them.
0 commit comments