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
The callback to `browserstackRunner.run` is called with two params -
48
+
-`error`: This parameter is either `null` or an `Error` object (if test execution failed) with message as the reason of why executing the tests on `BrowserStack` failed.
49
+
-`report`: This is an array which can be used to keep track of the executed tests and suites in a run. Each object in the array has the following keys -
50
+
-`browser`: The name of the browser the test executed on.
51
+
-`tests`: An array of `Test` objects. The `Test` Objects are described [here](https://github.com/js-reporters/js-reporters#event-data)
52
+
-`suites`: A global Suite Object as described [here](https://github.com/js-reporters/js-reporters#event-data)
53
+
54
+
The structure of the `report` object is as follows -
55
+
56
+
```json
57
+
[
58
+
{
59
+
"browser": "Windows 7, Firefox 47.0",
60
+
"tests": [
61
+
{
62
+
"name": "isOdd()",
63
+
"suiteName": "Odd Tests",
64
+
"fullName": [
65
+
"Odd Tests",
66
+
"isOdd()"
67
+
],
68
+
"status": "passed",
69
+
"runtime": 2,
70
+
"errors": [],
71
+
"assertions": [
72
+
{
73
+
"passed": true,
74
+
"actual": true,
75
+
"expected": true,
76
+
"message": "One is an odd number"
77
+
},
78
+
{
79
+
"passed": true,
80
+
"actual": true,
81
+
"expected": true,
82
+
"message": "Three is an odd number"
83
+
},
84
+
{
85
+
"passed": true,
86
+
"actual": true,
87
+
"expected": true,
88
+
"message": "Zero is not odd number"
89
+
}
90
+
]
91
+
}
92
+
],
93
+
"suites": {
94
+
"fullName": [],
95
+
"childSuites": [
96
+
{
97
+
"name": "Odd Tests",
98
+
"fullName": [
99
+
"Odd Tests"
100
+
],
101
+
"childSuites": [],
102
+
"tests": [
103
+
{
104
+
"name": "isOdd()",
105
+
"suiteName": "Odd Tests",
106
+
"fullName": [
107
+
"Odd Tests",
108
+
"isOdd()"
109
+
],
110
+
"status": "passed",
111
+
"runtime": 2,
112
+
"errors": [],
113
+
"assertions": [
114
+
{
115
+
"passed": true,
116
+
"actual": true,
117
+
"expected": true,
118
+
"message": "One is an odd number"
119
+
},
120
+
{
121
+
"passed": true,
122
+
"actual": true,
123
+
"expected": true,
124
+
"message": "Three is an odd number"
125
+
},
126
+
{
127
+
"passed": true,
128
+
"actual": true,
129
+
"expected": true,
130
+
"message": "Zero is not odd number"
131
+
}
132
+
]
133
+
}
134
+
],
135
+
"status": "passed",
136
+
"testCounts": {
137
+
"passed": 1,
138
+
"failed": 0,
139
+
"skipped": 0,
140
+
"total": 1
141
+
},
142
+
"runtime": 2
143
+
}
144
+
],
145
+
"tests": [],
146
+
"status": "passed",
147
+
"testCounts": {
148
+
"passed": 1,
149
+
"failed": 0,
150
+
"skipped": 0,
151
+
"total": 1
152
+
},
153
+
"runtime": 2
154
+
}
155
+
}
156
+
]
157
+
```
158
+
24
159
## Configuration
25
160
26
161
To run browser tests on BrowserStack infrastructure, you need to create a `browserstack.json` file in project's root directory (the directory from which tests are run), by running this command:
0 commit comments