From 836f826d3d8e234519e0412459160baaa2aa5a63 Mon Sep 17 00:00:00 2001 From: Saksham Arora Date: Tue, 11 Nov 2025 19:41:16 +0530 Subject: [PATCH] Updated documentation --- docs/sharding-espresso.md | 16 ++++++++++++++++ docs/speedup-espresso.md | 34 ++++++++++++++++++++-------------- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/docs/sharding-espresso.md b/docs/sharding-espresso.md index 14b5d69b6..b60c3f82b 100644 --- a/docs/sharding-espresso.md +++ b/docs/sharding-espresso.md @@ -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: diff --git a/docs/speedup-espresso.md b/docs/speedup-espresso.md index b0ef25a11..fab08cd8c 100644 --- a/docs/speedup-espresso.md +++ b/docs/speedup-espresso.md @@ -172,18 +172,22 @@ Please refer to the example `cURL` requests given below for your reference.
{`curl --location --request POST 'https://mobile-api.lambdatest.com/framework/v1/espresso/build' \\ - --header 'Authorization: Basic ' \\ - --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 ' \\ + --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" + ] + } + }'`}
@@ -194,7 +198,7 @@ Please refer to the example `cURL` requests given below for your reference. ``` - {`curl --location --request POST "https://mobile-api.lambdatest.com/framework/v1/espresso/build" --header "Content-Type: application/json" --header "Authorization: Basic " --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 " --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\"]}}"`} ``` @@ -202,7 +206,9 @@ Please refer to the example `cURL` requests given below for your reference. - +:::info +This configuration will run tests annotated with multiple annotations, i.e., only the intersection of all mentioned annotations will be considered. +:::