Elmasekar / UnitTest-set-testname

A sample repo to help you set test name for automation test in UnitTest on LambdaTest. Run your python automation test scripts on Lambdatest.

Home Page:https://www.lambdatest.com/unittest-testing/?utm_source=github&utm_medium=about&utm_campaign=unittest_set_testname

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to set test name for automation test in UnitTest on LambdaTest

If you want to set test name for automation test in UnitTest on LambdaTest, the following steps can be followed. You can refer to sample test repo here.

Steps

To set test name as method name in UnitTest, the name attribute can be added as a capability in the desired capabilities.For example:

desired_caps = {
            'LT:Options': {
                "build": "Python Demo",
                "name": "Python Demo Test",  # Change your test name here
                "platformName": "Windows 11",
                "selenium_version": "4.0.0", 
            },
            "browserName": "Chrome",
            "browserVersion": "98.0",
        }

Run your test

python lambdatest_test.py

Links:

LambdaTest Community