Android automation project with pytest+appium

Overview

APPIUM-AUTO-APP

一、介绍

pytest+appium 安卓自动化项目

二、软件架构

┌ common  
│   └ 基础方法  
│       └ BasePage.py 封装基本方法  
├ config  
│   └ 配置文件  
│       └ devices.yaml 管理测试机  
│       └ env.py 环境变量  
├ logs  
│   └ 日志报告  
├ pages  
│   └ 页面元素  
│       └ 继承BasePage编写对应page的文件  
├ report  
│   └ allure报告  
├ result  
│   └ html报告  
├ screen  
│   └ 截图文件
├ static  
│   └ 存储文件,如需上传的图片等(暂未使用)  
├ testcases  
│   └ 业务测试用例  
│       ├ conftest.py 公共操作文件(如登录)  
│       ├ test开头或结尾的测试用例  
│       └ run.py 用例启动文件  
├ utils  
└   └ 辅助功能函数  

三、安装教程

  1. pip install -r requirements.txt
  2. utils\appium_util.py第17行,编辑修改为本机的appium路径。
    注意最后是appium\build\lib结尾的。
    appium的安装路径配置环境变量,如APPIUM_HOME = 'C:\Users\XX\AppData\Local\Programs\Appium\resources\app\node_modules\appium\lib',注意android sdk的环境变量名要配置为ANDROID_HOME
  3. config\devices.yaml添加自己的设备,
    testcases\conftest.py中会根据devices.yaml来启动设备,返回driver_list,测试用例里传入driver来控制操作对应设备
  4. config\env.py是存储环境变量的文件,如账号密码等,可酌情使用

四、使用说明

  1. Page-Object设计思想
  2. testcases/run.py启动测试
  3. 如果项目第一次跑报错,请根据架构创建对应缺少的文件夹
  4. 项目中会用命令行启动appium服务,可不手动启动appium_desktop,具体看utils\appium_util.py文件
  5. pytest格式限制:
    5.1 测试用例文件是用test_开头或_test结尾的py文件
    5.2 测试用例的类用Test开头,测试类中不应该有构造函数
    5.3 测试用例中的方法用test_开头
  6. testcases\conftest.py只提供调起driver等非业务的公共方法,如果是业务的公共操作如登录, 建议在testcases业务子目录下新增conftest.py
Tools for test driven data-wrangling and data validation.

datatest: Test driven data-wrangling and data validation Datatest helps to speed up and formalize data-wrangling and data validation tasks. It impleme

269 Dec 16, 2022
Repository for JIDA SNP Browser Web Application: Local Deployment

JIDA JIDA is a web application that retrieves SNP information for a genomic region of interest in Homo sapiens and calculates specific summary statist

3 Mar 03, 2022
1st Solution to QQ Browser 2021 AIAC Track 2

1st Solution to QQ Browser 2021 AIAC Track 2 This repository is the winning solution to QQ Browser 2021 AI Algorithm Competition Track 2 Automated Hyp

DAIR Lab 24 Sep 10, 2022
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries. An example o

pytest-dev 9.6k Jan 02, 2023
Asyncio http mocking. Similar to the responses library used for 'requests'

aresponses an asyncio testing server for mocking external services Features Fast mocks using actual network connections allows mocking some types of n

93 Nov 16, 2022
MultiPy lets you conveniently keep track of your python scripts for personal use or showcase by loading and grouping them into categories. It allows you to either run each script individually or together with just one click.

MultiPy About MultiPy is a graphical user interface built using Dear PyGui Python GUI Framework that lets you conveniently keep track of your python s

56 Oct 29, 2022
A web scraping using Selenium Webdriver

Savee - Images Downloader Project using Selenium Webdriver to download images from someone's profile on https:www.savee.it website. Usage The project

Caio Eduardo Lobo 1 Dec 17, 2021
This is a web test framework based on python+selenium

Basic thoughts for this framework There should have a BasePage.py to be the parent page and all the page object should inherit this class BasePage.py

Cactus 2 Mar 09, 2022
Parameterized testing with any Python test framework

Parameterized testing with any Python test framework Parameterized testing in Python sucks. parameterized fixes that. For everything. Parameterized te

David Wolever 714 Dec 21, 2022
Descriptor Vector Exchange

Descriptor Vector Exchange This repo provides code for learning dense landmarks without supervision. Our approach is described in the ICCV 2019 paper

James Thewlis 74 Nov 29, 2022
Test scripts etc. for experimental rollup testing

rollup node experiments Test scripts etc. for experimental rollup testing. untested, work in progress python -m venv venv source venv/bin/activate #

Diederik Loerakker 14 Jan 25, 2022
It helps to use fixtures in pytest.mark.parametrize

pytest-lazy-fixture Use your fixtures in @pytest.mark.parametrize. Installation pip install pytest-lazy-fixture Usage import pytest @pytest.fixture(p

Marsel Zaripov 299 Dec 24, 2022
Sixpack is a language-agnostic a/b-testing framework

Sixpack Sixpack is a framework to enable A/B testing across multiple programming languages. It does this by exposing a simple API for client libraries

1.7k Dec 24, 2022
Local continuous test runner with pytest and watchdog.

pytest-watch -- Continuous pytest runner pytest-watch a zero-config CLI tool that runs pytest, and re-runs it when a file in your project changes. It

Joe Esposito 675 Dec 23, 2022
Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)

Leon 3.5k Dec 30, 2022
Test utility for validating OpenAPI documentation

DRF OpenAPI Tester This is a test utility to validate DRF Test Responses against OpenAPI 2 and 3 schema. It has built-in support for: OpenAPI 2/3 yaml

snok 103 Dec 21, 2022
Integration layer between Requests and Selenium for automation of web actions.

Requestium is a Python library that merges the power of Requests, Selenium, and Parsel into a single integrated tool for automatizing web actions. The

Tryolabs 1.7k Dec 27, 2022
This repository contnains sample problems with test cases using Cormen-Lib

Cormen Lib Sample Problems Description This repository contnains sample problems with test cases using Cormen-Lib. These problems were made for the pu

Cormen Lib 3 Jun 30, 2022
a socket mock framework - for all kinds of socket animals, web-clients included

mocket /mɔˈkɛt/ A socket mock framework for all kinds of socket animals, web-clients included - with gevent/asyncio/SSL support ...and then MicroPytho

Giorgio Salluzzo 249 Dec 14, 2022
Tattoo - System for automating the Gentoo arch testing process

Naming origin Well, naming things is very hard. Thankfully we have an excellent

Arthur Zamarin 4 Nov 07, 2022