https://github.com/lambdatest/pytest-custom-metadata
Add custom metadata to automation tests in Pytest on LambdaTest
https://github.com/lambdatest/pytest-custom-metadata
lambdatest pytest testing
Last synced: 5 months ago
JSON representation
Add custom metadata to automation tests in Pytest on LambdaTest
- Host: GitHub
- URL: https://github.com/lambdatest/pytest-custom-metadata
- Owner: LambdaTest
- Created: 2022-06-10T14:57:26.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-10T14:57:39.000Z (about 4 years ago)
- Last Synced: 2025-08-13T06:34:06.044Z (11 months ago)
- Topics: lambdatest, pytest, testing
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to add custom metadata to automation tests in Pytest on [LambdaTest](https://www.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=Pytest-custom-metadata)
If you want to add custom metadata to automation tests in Pytest on LambdaTest, you can follow the steps below. You can refer to sample test repo [here](https://github.com/LambdaTest/pytest-selenium-sample).
# Steps
With LambdaTest, you can add custom meta data to automation tests. These are added for tests by setting the data in `customData` capability. The code below illustrates the usage:
```
capabilities = {
"build": "Sample PY Build",
"platformName": "Windows 11",
"browserName": "Chrome",
"browserVersion": "latest",
"customData": [
{ "_id": "5f46aaa69adf77cfe2bb4fd6",
"index": "0",
"guid": "9451b204-12f0-4177-8fe9-fb019b3e4bf3",
"isActive": "False",
"picture": "http//placehold.it/32x32" } ]
}
```
## Run your test
```bash
cd tests //navigate to tests directory
python sample_todo.py
```
# Links:
[LambdaTest Community](http://community.lambdatest.com/)