danielle
danielle

Reputation: 883

Do Appium Python tests in AWS Device Farm have to run through pytest?

I've written some tests that have this structure:

├── __init__.py
├── __pycache__
├── config
│   ├── __init__.py
│   ├── android_chrome.py
│   ├── android_native.py
│   ├── base_config.py
│   ├── desktop_chrome.py
│   ├── ios_native.py
│   ├── ios_safari.py
│   └── nohup.out
├── school
│   ├── __init__.py
│   ├── test_enrollment.py
│   ├── test_attendance.py
│   └── test_field_trip.py
├── front_end_test_util.py
├── generator.py

I've been kicking off the tests with a command like:

python school/test_enrollment.py

The test_enrollment.py file imports generator.py, which loops through the various config files in config and generates a new class that combines the setUp of the platform config file and the tests from the test file.

When a test is running on a mobile platform, I am using an appium driver (as opposed to desktop platforms that use the selenium driver).

From this point, I would like to run these tests in AWS Device Farm, but when I go to upload my test file, it seems to expect a format that is compatible with pytest. I cannot run my tests the way that they are structured right now with pytest, because the main method in my test class that kicks off the generator is not getting called. Is there any way to run Appium Python tests in AWS Device Farm without using pytest?

Upvotes: 0

Views: 396

Answers (1)

Scott Theriault
Scott Theriault

Reputation: 98

Sorry, but currently there is no way to run Appium Python tests on AWS Device Farm without pytest.

If you can reformat your tests to work with pytest, they should work.

You can run a pytest dry run to make sure your tests are detected

py.test --collect-only tests/

Full documentation can be found Here

Upvotes: 1

Related Questions