# 收藏清单:Java自动化测试工具汇总




## xUnit frameworks 单元测试框架

* [JUnit](http://junit.org/) - 常用的测试框架
* [TestNG](http://testng.org/) - 测试框架
    * [Test Data Supplier](https://github.com/sskorol/test-data-supplier) - TestNG DataProvider封装，让数据的生成更加灵活

## TDD \ ATDD \ BDD

- 工具
    * [JBehave](http://jbehave.org/) - Behaviour-Driven Development (BDD)测试框架. BDD是从 test-driven development (TDD) 和 acceptance-test演进而来, 让用例的编写对新手更加友好和直觉化
    * [Cucumber-JVM](https://github.com/cucumber/cucumber-jvm) - 纯 java的Cucumber实现,支持大部分流行的jvm语言
    * [JGiven](https://github.com/TNG/JGiven) - 开发者友好且实用的BDD工具. 开发者使用纯java及流利API编写测试场景, JGiven负责生成领域专家可读的报告
    * [easyb](http://easyb.org/) - Java平台的BDD框架. 通过使用Domain Specific Language(DSL), easyb致力于让文档可读可执行
    * [robotframework](http://robotframework.org/) - 最有名的acceptance test-driven development (ATDD)测试框架
        * [awesome-robotframework](https://github.com/fkromer/awesome-robotframework) - 各种rf的扩展库
    * [Spectrum](https://github.com/greghaskins/spectrum) - BDD-style test runner，支持Java 8. 灵感来自于Jasmine, RSpec和Cucumber.
-
    * [cucumber-report-db](https://github.com/porscheinformatik/cucumber-report-db) - 把Cucumber的结果存到数据库里，并且提供测试报告

## Model-Based Testing

- [GraphWalker](http://graphwalker.org/) - Model-Based测试框架. 这个工具可以从 graphml, dot 或 json文件中读取model，然后自动创建测试用例

## Code analysis and coverage 代码扫描和代码覆盖率

* [SonarQube](http://www.sonarqube.org) - 管理代码质量的开源工具
* [Gradle Quality Plugin](https://github.com/xvik/gradle-quality-plugin) - 静态代码分析工具，支持Java和Groovy，使用 Checkstyle, PMD, FindBugs 和CodeNarc. 插件使用了统一的控制台输出并简化了开发者的工作流: 查看不规范的错误时只需要留意控制台就好，并且控制台输出的体验跟java编译错误的输入体验一致
* [Qulice](https://github.com/teamed/qulice) - Qulice是Java项目的代码扫描和质量控制工具. 包含了最好的静态代码扫描工具和预配置选项。你不需要单独再对这些工具进行配置了。
* [JaCoCo](https://github.com/jacoco/jacoco) - JaCoCo是免费的代码覆盖率统计工具，应该也是应用最广泛的覆盖率工具了。

## Web UI test automation web ui自动化工具

- libraries
    * [Selenium](http://docs.seleniumhq.org/) - 浏览器自动化工具
    * [SikuliX](http://www.sikulix.com/) - 基于OpenCV的 GUI 测试框架, 使用图片识别技术，支持windows/linux/mac系统
- frameworks and wrappers 框架及封装
    * [Selenide](http://selenide.org/) - 简洁的Selenium封装,让 UI用例的编写更容易
    * [Selenified](https://github.com/Coveros/selenified) - 开源的测试框架，目的是让selenium测试更加简单,提供了简单的接口去添加测试报告，错误处理以及线程安全的运行模式。可以运行在本机或云端(Grid or SauceLabs).
    * [Serenity BDD (Thucydides)](http://www.thucydides.info/) - 创新的开源库，让你可以更高效的编写用户验收用例, 并可以根据用例去生成项目文档及测试报告
    * [htmlelements](https://github.com/yandex-qatools/htmlelements) - 让web测试时元素交互更加简单的java库
    * [atlassian-selenium](https://bitbucket.org/atlassian/atlassian-selenium) - 让开发者可以更高效的编写Selenium/WebDriver功能测试的开源库
    * [stevia](https://github.com/persado/stevia) - Persado出品的开源自动化测试框架
    * [darcy](https://github.com/darcy-framework) - 开源的测试框架，支持java 8，提供了具有表意性以及使用简单的API
    * [Satisfy](http://satisfy.tapack.io) - 基于Thucydides和Jbehave的开源测试框架。支持WebUI, SOAP, REST, emails, files，并支持创建随机数据，开箱即用
    * [JDI UI Test Automation Framework](https://github.com/epam/JDI/) -  UI自动化测试框架。扩展了Page Object设计模式，并加入了一些常用的元素
    * [Geb Framework](http://gebish.org/) - 基于groovy自动化测试框架。专为Webdriver Page Object设计模式以及Spock Framework(BDD)的集成而设计。
    * [FluentLenium](https://github.com/FluentLenium/FluentLenium) - FluentLenium可以帮助你写出可读性好, 可重用, 可靠且灵活的Web UI功能测试用例. FluentLenium 提供了为Selenium实现的流利api,并为selenium用户的一些常见问题提供了解决方案。
    * [Selion](https://github.com/paypal/SeLion) - 基于TestNG和Selenium提供了一系列的功能，让你可以在短时间内搞定webdriver. 支持web和移动端测试
- extensions 扩展
    * [BrowserMob Proxy](https://github.com/lightbody/browsermob-proxy) -从浏览器获取性能数据的简单工具, 一般跟自动化工具，比如Selenium和Watir配合使用
    * [Selenium-Grid-Extras](https://github.com/groupon/Selenium-Grid-Extras) - 让Selenium Grid 节点的管理更加简单， 并通过清理测试环境的方式让节点更加稳定
    * [Selenium Grid Extensions](https://github.com/sterodium/selenium-grid-extensions) - 扩展了Selenium grid，以及可以在执行selenium用例的同时执行Sikuli用例
    * [Selenium Grid Router](https://github.com/seleniumkit/gridrouter) 轻量级的server，作用是把Selenium Wedriver的请求分发到多个Selenium hub。
    * [Docker Selenium Grid](https://github.com/sskorol/docker-selenium-grid) - 提供了native的视频录制功能，支持Selenium Grid，最初被设计为跟docker-selenium一同使用。
    * [Video Recorder Java](https://github.com/SergeyPirogov/video-recorder-java) - 使用自动化测试用例来录制视频的java库
    * [Zalenium](https://github.com/zalando/zalenium) - 提供一次性的灵活的Docker-based Selenium Grid视频录制功能, 支持实时预览和online/offline控制面板。
    * [SikuliFactory](https://github.com/marcoslimaqa/sikuli-factory) - 为SikuliX提供了PageFactory实现。
    * [Mailosaur](https://github.com/mailosaur/mailosaur-java) -  邮件自动化测试工具，基于Mailosaur。

## Mobile test automation 移动自动化测试

* [Appium](http://appium.io/) - 开源的自动化测试框架，可以测试native/hybrid/mobile web应用。核心是基于webdriver协议进行了扩展
* [Calabash](http://calaba.sh/) - 跨平台的自动化测试框架，支持Android和iOS的原生应用以及hybrid应用。 Calabash的语法非常容易理解，甚至可以让非技术人员编写和执行基于上述平台的自动化测试用例。
* [Robotium](https://code.google.com/p/robotium/) - 安卓自动化测试框架，支持原生及hybrid应用. Robotium让我们可以非常方便的编写强大和稳定的黑盒UI测试用例。 有了Robotium的支持, 测试开发工程师可以编写安卓应用的功能用例系统用例以及用户验收用例。
* [UIautomator](http://developer.android.com/tools/help/uiautomator/index.html) - 提供了高效的测试UI的方式。 可以创建支持真机及模拟器运行的自动化测试用例，并包含了可以查看和分析安卓UI的viewer。
* [Espresso](https://code.google.com/p/android-test-kit/wiki/Espresso) - 比较新的开源自动化测试框架, 让开发者和测试人员都可以编写UI用例。 Espresso的api简单且易学，你可以非常快的使用这个框架上手安卓自动化测试

## API test automation 接口自动化测试

* [Karate-DSL](https://github.com/intuit/karate) - Karate是BDD风格的使用javascript实现的测试框架。可以让你调用任何web-service类型的接口并对响应进行断言。


## Windows UI test automation windows ui自动化测试工具

* [SikuliX](http://sikulix.com/) - 基于OpenCV的 GUI 测试框架, 使用图片识别技术，支持多操作系统
* [Winium.Desktop](https://github.com/2gis/Winium.Desktop/) - 测试Windows应用(主要是基于WinForms和WPF平台)的自动化测试工具. 实现了Selenium Remote WebDriver协议

## Unix \ Linux UI test automation Unix \ Linux ui自动化工具

* [SikuliX](http://sikulix.com/) - 基于OpenCV的 GUI 测试框架, 使用图片识别技术，支持多操作系统

## MacOS UI test automation mac ui自动化工具

* [SikuliX](http://sikulix.com/) - 基于OpenCV的 GUI 测试框架, 使用图片识别技术，支持多操作系统

## Server side test automation 服务端自动化测试工具

* [Citrus](https://github.com/christophd/citrus) - Javas实现的测试框架，支持企业级SOA应用的e2e服务测试， 支持 HTTP, JMS, TCP/IP, FTP, SOAP协议，以及XML和JSON.




原始封面

![课程图片](https://images.unsplash.com/photo-1484480974693-6ca0a78fb36b?w=300)


