2017-03-20 50 views
0

我已經寫了一些測試,有這樣的結構:AWS Device Farm中的Appium Python測試是否必須通過pytest運行?

├── __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 

我已經踢了測試用以下命令:

python school/test_enrollment.py 

test_enrollment.py文件導入generator.py,它通過循環config中的各種配置文件,並生成一個新類,它將平臺配置文件的setUp和測試文件的測試結合起來。

在移動平臺上運行測試時,我使用的是appium驅動程序(與使用selenium驅動程序的桌面平臺相反)。

從這一點,我想在AWS Device Farm中運行這些測試,但是當我去上傳我的測試文件時,它似乎期望與pytest兼容的格式。我不能像現在用pytest那樣運行我的測試,因爲我的測試類中關閉生成器的主要方法沒有被調用。有沒有辦法在不使用pytest的情況下在AWS Device Farm中運行Appium Python測試?

回答

0

很抱歉,目前沒有辦法在沒有pytest的情況下在AWS Device Farm上運行Appium Python測試。

如果您可以重新格式化您的測試以使用pytest,他們應該工作。

可以運行pytest預演,以確保您的測試檢測

py.test --collect-only tests/ 

完整文檔,可以發現Here

相關問題