• Stars
    star
    120
  • Rank 295,983 (Top 6 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

基于WebDriver的WebUI自动化测试框架

License Maven Central

PhoenixAutoTest

本项目是一个基于 Selenium 的Web自动测试框架,通过该框架可以简化测试人员的学习难度,只要 编写少量的Java代码即可,大多数的工作都是编写页面元素的描述文件以及对应的数据源。以下是本框架的特色:

  • 支持多种元素选择策略(优先级、循环、区域)
  • 支持多种数据源yamlexcel
  • 支持包括:HTMLExcelJira数据库等格式的测试报告输出
  • 支持数据源、URL、元素定位信息的参数化
  • 支持密文数据,javascript、groovy、freemarker等动态脚本数据
  • 支持动态生成日期、身份证号码、手机号、邮编等数据
  • 支持操作日志生成GIF动态图片
  • 支持主流的浏览器(ie、firefox、chrome、opera、safari)以及 headless 模式
  • 支持纯 XML 编写完成自动化测试功能
  • 自动下载 WebDriver 驱动

快速开始

你可以先下载这个示例项目,来快速地体验。

引擎配置

你可以通过引擎配置文件 engine.properties 调整框架的默认行为,支持的配置项包括:

Key 默认值 描述
engine.autoLoad true 是否自动下载 WebDriver
cookie.save false
cookie.save.path phoenix.autotest.cookie
chrome.version Chrome 浏览器版本
chrome.args.headless false
chrome.args.intl.accept_languages
chrome.args.lang 浏览器语言设置,例如:zh_CN
chrome.args.window-size= 设置浏览器窗口大小,例如:1024,768

在 Maven 项目中,该文件的位置是:src/main/resources/engine.properties。你可以从 Chrome 官方文档 查找完整的参数。

元素定位

国际化页面

对于具有国际化的前端页面,浏览器的语言不同的情况下页面元素会有不同的展示。例如:一个按钮中文时显示为:确认,英文时显示为:OK。 此时,如果我们希望通过这里的文本字符串来定位的话,可以参考下面的示例,同时提供多个定位方法,并指定语言:

@AutoLocators(strategy = StrategyType.CYLE, locators = {
    @AutoLocator(locator = LocatorType.BY_XPATH, value = "//p[contains(text(),'企业空间')]", lang = "zh-CN"),
    @AutoLocator(locator = LocatorType.BY_XPATH, value = "//p[contains(text(),'Workspaces')]")
})

More Repositories

1

remote-jobs-in-china

支持远程办公的中国公司
2,016
star
2

open-source-best-practice

This is an open-source best practice for those who want to participate in open-source projects 参与开源过程中的一些最佳实践
Smarty
256
star
3

http-downloader

A download tool that is baked for the GitHub release assets. 专注于 GitHub 项目的工具安装
Go
43
star
4

phoenix.platform

WebUI自动化测试平台
CSS
41
star
5

transfer

A file transfer tool that via UDP protocol on Linux, Windows, and macOS.
Go
20
star
6

api-testing

YAML based API testing tool
Go
14
star
7

yaml-readme

A helper to generate the READE file automatically from YAML-based metadata files.
Go
12
star
8

gh-dev

A gh extension to work with GitHub repositories with Codespaces.
Shell
9
star
9

gogit

Sending build status to different git providers
Go
7
star
10

phoenix.webui.framework.demo

phoenix.autotest自动化测试框架的示例
Java
7
star
11

cgit

cgit is a tiny git tool for Chinese developers. cgit can clone code from a mirror of GitHub.
Go
6
star
12

md-exec

Run commands or scripts which in Markdown files
Go
6
star
13

awesome-ai

Collect all kinds of awesome AI tools
6
star
14

hd-home

The home of GitHub release assets
Dockerfile
6
star
15

github-action-workflow

GitHub Actions compitable workflows
Go
5
star
16

phoenix.interface.framework

接口自动化测试框架
Java
5
star
17

private-update-center

Jenkins Private Update Center
Makefile
5
star
18

go-ffmpeg

Audio convert by ffmpeg
Go
5
star
19

jetbrains-projector

Using JetBrains products as remote. Put Goland in your Kubernetes cluster!
Mustache
4
star
20

autotest.report.jira

自动化测试报告,自动提交bug
Java
4
star
21

awesome-feeds

Read high-quality content from feeds (blogs or Podcasts)
Smarty
4
star
22

argo-workflow-atomic-plugin

An atomic plugin of Argo workflows
Go
3
star
23

.github

3
star
24

ssh-hosts

Sync hostname and ip between hosts and ssh-config
Go
3
star
25

surenpi

个人博客,知识的积累和分享
JavaScript
3
star
26

phoenix.webui.suite.runner

自动化测试套件
Java
3
star
27

vscode-api-testing

API testing support for VS Code
JavaScript
3
star
28

autotest.report

自动化测试报告接口定义
Java
3
star
29

phoenix.webui.framework.archetype

WebUI自动化测试框架Maven骨架
Java
3
star
30

LinuxSuRen

This's a personal dashboard!
3
star
31

tools

Online tools for developers
JavaScript
3
star
32

goget

Get a binary file directly from the Golang source project.
Go
3
star
33

phoenix.webui.server

selenium-server的封装
Java
3
star
34

homebrew-linuxsuren

Ruby
2
star
35

fugitive-gitee.vim

An extension to fugitive.vim for gitee support
Vim Script
2
star
36

api-testing-vault-extension

A Vault-based secret extension of api-testing.
Go
2
star
37

cobra-extension

This is the extension of cobra which is a Commander for modern Go CLI interactions
Go
2
star
38

audacity-label-plugin

Convert Audacity label track to more formats
JavaScript
2
star
39

mirrors

Pull the image from the mirror
Go
2
star
40

autotest.datasource.excel

Excel格式的数据源
Java
2
star
41

hugo-plugin

Java
2
star
42

orbit-assistant

Help you to record your team member's activities with GitHub Actions
Go
2
star
43

bad-behavior

List of some bad behaviors
2
star
44

unstructured

Library for manipulate unstructured data in Golang
Go
2
star
45

autotest.parent

自动化测试parent
Makefile
2
star
46

linuxsuren-versions

2
star
47

english-for-kids

English readings for kids
2
star
48

autotest.webdriver.downloader

WebDriver驱动下载器
Java
2
star
49

ks-scripts

Some handy scripts can make us happy when working with Kubesphere
Shell
2
star
50

go-fake-runtime

A Go library for providing a fake runtime
Go
1
star
51

jx-eclipse-plugin

Java
1
star
52

atest-ext-store-git

Git Store Extension of API Testing
Go
1
star
53

autotest.report.database

数据库格式的自动化测试报告
Java
1
star
54

ks-ui-test

Java
1
star
55

inspirational-movie

适合青少年看的励志电影
1
star
56

.gitpod

1
star
57

autotest.datasource

自动化测试数据源接口
Java
1
star
58

jcli-ks-plugin

Go
1
star
59

image-filter

1
star
60

hello-github-actions

Dockerfile
1
star
61

LinuxSettings

Shell
1
star
62

no-ad-chrome-extension

JavaScript
1
star
63

atest-ext-runner-trpc

API Testing Runner Extension for tRPC
1
star
64

discourse-cli

Go
1
star
65

jenkins-wechat-tool

Go
1
star
66

awesome-swag

Don't worry about how to choose swag for your community
1
star
67

autotest.code.compiler

自动化代码编译
Java
1
star
68

devops.vim

DevOps ide for VIM
Vim Script
1
star
69

autotest.datasource.yaml

yaml格式的自动化测试数据源
Java
1
star
70

linuxsuren-bot-config

1
star
71

go-cli-alias

Go
1
star
72

oschina-plugin

1
star
73

autotest.code.generator

自动化代码生成
Java
1
star
74

net-proxy

Network proxy
Go
1
star
75

awesome-k8s-installer

A curated list of awesome Kubernetes installers
1
star
76

git-chrome-extension

JavaScript
1
star
77

gotorrent

Go
1
star
78

gows

WebSocket tool written by Go
Go
1
star
79

go-cli-plugin

A library for go CLI plugin
Go
1
star
80

autotest.report.excel

Excel格式的自动化测试报告
Java
1
star
81

autotest.web.phoenixdriver

autotest.web.phoenixdriver
Java
1
star
82

jenkins-plugin-api-client

Go
1
star
83

com.surenpi.hibernate

Java
1
star
84

github-go

Shell
1
star
85

autotest.report.html

This project can generate an HTML report for auto testing.
Java
1
star
86

SuRen

This is a Java Swing Program.
Java
1
star
87

getGo

Shell
1
star
88

autotest.utils

工具类
Java
1
star
89

autotest.webui

WebUI自动化测试接口定义
Java
1
star
90

swag-gallery

A personal swag gallery which comes from many open-source events
1
star
91

open-source-podcasts

1
star
92

open-source-events

Explore the Open-Source events here
1
star
93

test-tools-from-china

Test tools from China
1
star
94

oauth-hub

OAuth2
Go
1
star
95

linuxsuren.github.io

Tecnical Web Site
HTML
1
star