当前位置:网站首页>Do you know the advantages and disadvantages of several open source automated testing frameworks?
Do you know the advantages and disadvantages of several open source automated testing frameworks?
2022-07-06 15:13:00 【Test Xiaowan】
Catalog
1. Robot Framework
Robot Framework(RF) Is used for acceptance testing and acceptance test driven development (ATDD) Automatic testing framework of . be based on Python To write , But it can also be in Jython(Java) and IronPython(.NET) Up operation , Provide cross platform support (Windows、Linux or MacOS ).
advantage :
- By using keywords to drive tests (KDT) The method simplifies the automatic testing process , Easy for testers to create readable tests .
- The test data syntax is simple and easy to use .
- The ecosystem is rich . It consists of various general test libraries and tools , These tools were developed as independent projects .
- Highly scalable .
- It can be done by pabot or Selenium Grid Execute parallel tests .
shortcoming :
- Customize HTML The report is troublesome .
If it is for a wide range of libraries and extensions KDT automated testing , It is recommended to use this cross platform framework . If you want to add new keywords ( adopt RF Test library API ), Need to have Java / Python / C Basic knowledge of language .
2. JUnit
JUnit It's about Java Unit test framework of application , For writing and running repeatable tests .
advantage :
- pure Java To write .
- Support Test Driven Development (TDD).
- Allow to create your own unit test case suite .
- Can work well with other tools ( Such as Maven ) and IDE( Such as IntelliJ ) Integrate .
- Long term development , It has its own huge user group , Documents can be easily found .
shortcoming :
- if necessary mocking Ability , Additional Mockito( Or other simulation libraries ).
- because JUnit Method names in are affected by Java Agreed restrictions and other reasons , It is difficult for non-technical personnel to understand the test results .
If you are working for your Java Application writing unit tests , Then this may be the best choice . however , For functional testing or non Java application , Other solutions should be considered .
3. Spock
Spock Is used for Java and Groovy Applied testing and specification framework , be based on JUnit .
advantage :
- The test is readable , Support simple English sentences , Easy to read .
- Provide surrounding context , Thus, it is easy to understand how to solve the fault .
- built-in mocking and stubbing function .
- Support data-driven testing (DDT).
shortcoming :
- You need to have basic Groovy language knowledge .
If your application is based on JVM Of , And the goal is to use DSL Conduct BDD automated testing , Then this framework is suitable for !
4. NUnit
NUnit It supports all .Net The language's unit testing framework . It was originally based on Junit Inspired by the , Full adoption C# To write , It has been completely redesigned to use more .NET Language function .
advantage :
- Fast startup and test execution .
- With assertions and comments .
- Support for parallel testing .
- Support Test Driven Development (TDD).
shortcoming :
- Non cross platform , Only applicable to .Net Language .
- Not integrated into Visual Studio echo In the system , It means that using it requires more maintenance .
A good one C# Open source unit testing framework , Has a long history , High reputation . however , If you are ready to use .NET Language , You can also consider MSTest .
5. TestNG
TestNG It's a Java Automated testing framework , suffer JUnit and NUnit Inspired by the , But some functions have been improved and added . Designed to cover all automated test categories : unit testing 、 A functional test 、 End to end 、 Integration testing, etc .
advantage :
- Easy to integrate into maven In circulation .
- Enable developers to write flexible and powerful tests .
- Support data-driven testing (DDT).
- Notes are easy to understand .
- Test cases can be easily grouped .
- Allow the creation of parallel tests .
shortcoming :
- Only support Java , At least you need to have Java Basic knowledge of programming language .
- Time must be invested in framework setting and design .
If you use Java , And is looking for an end-to-end automated testing framework , At the same time, I am willing to invest a little time in setting the framework , You should consider using TestNG .
6. Jasmin
Jasmine It's a JavaScript Unit test framework , Also known as JavaScript Behavior driven development (BDD) The test framework . For web pages 、Node.js Project or anything that can run JavaScript The place of . It is mainly related to AngularJS Pairs using .
advantage :
- except JavaScript , It can also run in Python and Ruby in . If you want to run client tests on your server , It can help you .
- By many CIs Use and support .
- Built in syntax for assertions .
shortcoming :
- Most of the time , It requires a test runner ( Such as Karma ).
- Difficult to test asynchronously .
If you are looking for a unified ( client - The server ) Unit testing solutions ,Jasmin May be very suitable .
7. Mocha
Mocha It's a JavaScript Unit test framework , It's in NodeJs Run tests on , Mainly with ReactJS Pairs using .
advantage :
- Built in test runner .
- Support asynchronous testing .
- Flexible use , You can use any assertion library that meets your needs (Chai、expect.js、Must.js etc. ) As Node standard “ Assertion ” A functional alternative .
shortcoming :
- Relatively new ( From 2012 year ), It means that there are many unknowns and variability , In some aspects, it may lack user base and support .
Only basic test structures are provided , Therefore, additional settings and configurations are required ( It may be beneficial for some ).
If you're looking for JavaScript Independent unit testing framework ,Mocha First choice !
Thank everyone who reads my article carefully !!!
If you can use the following information, you can take it away directly :
1、 Self study development or test the necessary complete project source code and environment
2、 Test all templates in the work ( test plan 、 The test case 、 Test report, etc )
3、 Classic interview questions for software testing
4、Python/Java Automation test practice .pdf
5、Jmeter/postman Interface test full set of video acquisition
I personally sorted out some technical materials I have sorted out in my software testing career in recent years , contain : e-book , Resume module , Various work templates , Interview treasure , Self study projects, etc . Please find me in the comment area if you need it. Thank you .
边栏推荐
- 自动化测试中敏捷测试怎么做?
- Portapack application development tutorial (XVII) nRF24L01 launch B
- Daily code 300 lines learning notes day 9
- Keil5 MDK's formatting code tool and adding shortcuts
- MySQL development - advanced query - take a good look at how it suits you
- [Ogg III] daily operation and maintenance: clean up archive logs, register Ogg process services, and regularly back up databases
- 自动化测试你必须要弄懂的问题,精品总结
- 如何成为一个好的软件测试员?绝大多数人都不知道的秘密
- JDBC介绍
- Want to learn how to get started and learn software testing? I'll give you a good chat today
猜你喜欢

Fundamentals of digital circuits (II) logic algebra

MySQL数据库(四)事务和函数
![[HCIA continuous update] advanced features of routing](/img/05/a9ed32ec8c19b236355d48f7c2ad80.jpg)
[HCIA continuous update] advanced features of routing

Vysor uses WiFi wireless connection for screen projection_ Operate the mobile phone on the computer_ Wireless debugging -- uniapp native development 008

STC-B学习板蜂鸣器播放音乐

What is the transaction of MySQL? What is dirty reading and what is unreal reading? Not repeatable?

Portapack application development tutorial (XVII) nRF24L01 launch B

The number of reversing twice in leetcode simple question

Cc36 different subsequences

几款开源自动化测试框架优缺点对比你知道吗?
随机推荐
Wang Shuang's detailed learning notes of assembly language II: registers
A method and implementation of using VSTO to prohibit excel cell editing
Investment should be calm
What is an index in MySQL? What kinds of indexes are commonly used? Under what circumstances will the index fail?
How to rename multiple folders and add unified new content to folder names
如何成为一个好的软件测试员?绝大多数人都不知道的秘密
Mysql database (IV) transactions and functions
Maximum nesting depth of parentheses in leetcode simple questions
Software testing interview summary - common interview questions
ucore lab6 调度器 实验报告
Mysql database (III) advanced data query statement
Emqtt distribution cluster and node bridge construction
Sorting odd and even subscripts respectively for leetcode simple problem
Mysql database (V) views, stored procedures and triggers
Pedestrian re identification (Reid) - data set description market-1501
Mysql database (I)
Threads and thread pools
[HCIA continuous update] working principle of static route and default route
Eigen User Guide (Introduction)
The number of reversing twice in leetcode simple question