Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/sharding-espresso.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,24 @@ filters:
values: ["com.lambdatest.proverbial"]
```


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.

## Annotations in Sharding

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.

```yaml
filters:
attributes:
- type: annotation
values: ["com.lambdatest.proverbial.demo1", "com.lambdatest.proverbial.demo2"]
```

:::info
This configuration will run tests annotated with multiple annotations, i.e., only the intersection of all mentioned annotations will be considered.
:::

## Generate Reports and Artifacts
To generate artifacts for your Espresso tests, add the `artifacts: true`, and `report: true` flag in your YAML file:

Expand Down
34 changes: 20 additions & 14 deletions docs/speedup-espresso.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,22 @@ Please refer to the example `cURL` requests given below for your reference.
<div className="lambdatest__codeblock">
<CodeBlock className="language-bash">
{`curl --location --request POST 'https://mobile-api.lambdatest.com/framework/v1/espresso/build' \\
--header 'Authorization: Basic <Enter_Basic_Auth>' \\
--header 'Content-Type: application/json' \\
--data-raw '{
"app" : "lt://APP_ID",
"testSuite": "lt://TestSuite_ID",
"device" : ["Pixel 6-12"],
"queueTimeout": 360,
"IdleTimeout": 150,
"deviceLog": true,
"build" : "Proverbial-Espresso"
"annotation" : "com.example.proverbial.annotation"
}'`}
--header 'Authorization: Basic <Enter_Basic_Auth>' \\
--header 'Content-Type: application/json' \\
--data-raw '{
"app": "lt://APP_ID",
"testSuite": "lt://TestSuite_ID",
"device": ["Pixel 6-12"],
"queueTimeout": 360,
"IdleTimeout": 150,
"deviceLog": true,
"build": "Proverbial-Espresso",
"filters": {
"annotation": [
"com.lambdatest.proverbial.demo1","com.lambdatest.proverbial.demo2"
]
}
}'`}
</CodeBlock>
</div>
</TabItem>
Expand All @@ -194,15 +198,17 @@ Please refer to the example `cURL` requests given below for your reference.
<CodeBlock className="language-powershell">

```
{`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\"}"`}
{`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\"]}}"`}
```

</CodeBlock>
</div>
</TabItem>
</Tabs>


:::info
This configuration will run tests annotated with multiple annotations, i.e., only the intersection of all mentioned annotations will be considered.
:::

<nav aria-label="breadcrumbs">
<ul className="breadcrumbs">
Expand Down
Loading