Skip to content

Commit c8bda1d

Browse files
authored
Merge pull request #2260 from sakshamarora-arch/stage
Updated documentation
2 parents 4e41309 + 836f826 commit c8bda1d

File tree

2 files changed

+36
-14
lines changed

2 files changed

+36
-14
lines changed

docs/sharding-espresso.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,24 @@ filters:
302302
values: ["com.lambdatest.proverbial"]
303303
```
304304

305+
305306
This example will fetch all the test cases from 2 classes and 1 package as defined above and divide them with respect to concurrency given in the yaml file.
306307

308+
## Annotations in Sharding
309+
310+
You can also filter your Espresso tests based on annotations while using sharding. This helps you execute only the test cases marked with specific annotations.
311+
312+
```yaml
313+
filters:
314+
attributes:
315+
- type: annotation
316+
values: ["com.lambdatest.proverbial.demo1", "com.lambdatest.proverbial.demo2"]
317+
```
318+
319+
:::info
320+
This configuration will run tests annotated with multiple annotations, i.e., only the intersection of all mentioned annotations will be considered.
321+
:::
322+
307323
## Generate Reports and Artifacts
308324
To generate artifacts for your Espresso tests, add the `artifacts: true`, and `report: true` flag in your YAML file:
309325

docs/speedup-espresso.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,22 @@ Please refer to the example `cURL` requests given below for your reference.
172172
<div className="lambdatest__codeblock">
173173
<CodeBlock className="language-bash">
174174
{`curl --location --request POST 'https://mobile-api.lambdatest.com/framework/v1/espresso/build' \\
175-
--header 'Authorization: Basic <Enter_Basic_Auth>' \\
176-
--header 'Content-Type: application/json' \\
177-
--data-raw '{
178-
"app" : "lt://APP_ID",
179-
"testSuite": "lt://TestSuite_ID",
180-
"device" : ["Pixel 6-12"],
181-
"queueTimeout": 360,
182-
"IdleTimeout": 150,
183-
"deviceLog": true,
184-
"build" : "Proverbial-Espresso"
185-
"annotation" : "com.example.proverbial.annotation"
186-
}'`}
175+
--header 'Authorization: Basic <Enter_Basic_Auth>' \\
176+
--header 'Content-Type: application/json' \\
177+
--data-raw '{
178+
"app": "lt://APP_ID",
179+
"testSuite": "lt://TestSuite_ID",
180+
"device": ["Pixel 6-12"],
181+
"queueTimeout": 360,
182+
"IdleTimeout": 150,
183+
"deviceLog": true,
184+
"build": "Proverbial-Espresso",
185+
"filters": {
186+
"annotation": [
187+
"com.lambdatest.proverbial.demo1","com.lambdatest.proverbial.demo2"
188+
]
189+
}
190+
}'`}
187191
</CodeBlock>
188192
</div>
189193
</TabItem>
@@ -194,15 +198,17 @@ Please refer to the example `cURL` requests given below for your reference.
194198
<CodeBlock className="language-powershell">
195199

196200
```
197-
{`curl --location --request POST "https://mobile-api.lambdatest.com/framework/v1/espresso/build" --header "Content-Type: application/json" --header "Authorization: Basic <Enter the Auth here>" --data-raw "{\"app\" : \"lt://APP_ID\",\"testSuite\": \"lt://APP_ID\",\"device\" : [\"Pixel 6-12\"],\"queueTimeout\": 360,\"IdleTimeout\": 150,\"deviceLog\": true,\"network\": false,\"build\" : \"Proverbial-Espresso\",\"geoLocation\" : \"FR\", \"annotation\" : \"com.example.proverbial.annotation\"}"`}
201+
{`curl --location --request POST "https://mobile-api.lambdatest.com/framework/v1/espresso/build" --header "Authorization: Basic <Enter the Auth here>" --header "Content-Type: application/json" --data-raw "{\"app\": \"lt://APP_ID\", \"testSuite\": \"lt://APP_ID\", \"device\": [\"Pixel 6-12\"], \"queueTimeout\": 360, \"IdleTimeout\": 150, \"deviceLog\": true, \"network\": false, \"build\": \"Proverbial-Espresso\", \"geoLocation\": \"FR\", \"filters\": {\"annotation\": [\"com.lambdatest.proverbial.demo1\", \"com.lambdatest.proverbial.demo2\"]}}"`}
198202
```
199203

200204
</CodeBlock>
201205
</div>
202206
</TabItem>
203207
</Tabs>
204208

205-
209+
:::info
210+
This configuration will run tests annotated with multiple annotations, i.e., only the intersection of all mentioned annotations will be considered.
211+
:::
206212

207213
<nav aria-label="breadcrumbs">
208214
<ul className="breadcrumbs">

0 commit comments

Comments
 (0)