4 good automated testing frameworks for Python, what are the advantages of Robot Framework?


With the advancement of technology and the emergence of automation technology, some automated testing frameworks have appeared on the market. Only need to adjust some applicability and efficiency parameters, these automated test frameworks can be used out of the box, greatly saving test time. And because these frameworks are widely used, they are very robust, and have a wide variety of use case sets and techniques to easily find tiny defects.

Previously, the test team took over a project, and they had to build an automated testing framework for this project. A testing framework should have the best test cases, assumptions, scripts and techniques to run every code and module, so as to find code defects and deficiencies. Different projects require different test cases, hypotheses, and scripts, and this is why a lot of time is spent in these tests. However, what makes testers extremely happy now is that the days of building their own testing framework are finally over. Today, we will talk about the available Python automated testing frameworks.

Robot Framework

Link: http://robotframework.org/

Robot Framework (RF) is an automated testing framework for acceptance testing and acceptance test-driven development (ATDD). Written in Python, but can also run on Jython (Java) and IronPython (.NET), providing cross-platform support (Windows, Linux or MacOS).

advantage:

The use of keyword-driven testing (KDT) simplifies the automated testing process, making it easier for testers to create easy-to-read tests.

The test data syntax is simple and easy to use.

The ecosystem is rich. It is composed of various general test libraries and tools, which are all developed as independent projects.

It is highly scalable.

Parallel testing can be performed via pabot or Selenium Grid.

Disadvantages:

Custom HTML reports are more cumbersome.

If it is for a wide range of libraries and extended KDT automated testing, it is recommended to use this cross-platform framework. If you want to add new keywords (via RF test library API), you need to have basic knowledge of Java / Python / C language.

RedwoodHQ

Link: http://redwoodhq.com/

RedwoodHQ is a popular automated testing tool. It is popular because most popular programming languages ​​can be used to write tests, such as Java, Python, C#, etc. On the RedwoodHQ website interface, multiple testers can collaborate and run test cases on a platform. Developers can use the action keyword that appears in RedwoodHQ to create and modify test cases effortlessly.

All you need to do is find the required action, drag it to the test box, enter the parameters and change their values ​​to generate a complete test report. RedwoodHQ has a built-in IDE (Integrated Development Environment) where you can create, modify, and run test cases. RedwoodHQ is one of the most user-friendly or tester-friendly platforms. It focuses on the entire testing process of a major project.

Jasmine

Link: https://jasmine.github.io/

Jasmine is a JavaScript unit testing framework, also known as JavaScript Behavior Driven Development (BDD) testing framework. Suitable for web pages, Node.js projects, or any place where JavaScript can be run. It is mainly used in pair with AngularJS.

advantage:

In addition to JavaScript, it can also run in Python and Ruby. If you want to run client-side tests on your server, it can help you.

Used and supported by many CIs.

Built-in syntax for assertion.

Disadvantages:

In most cases, it requires a test runner (such as Karma).

It is difficult to test asynchronously.

If you are looking for a unified (client-server) unit testing solution, Jasmin may be very suitable.

Pytest

Link: https://docs.pytest.org/en/latest/

If your project is relatively small and low in complexity, Pytest is the most suitable automated testing platform. Pytest is a unit test framework of python, similar to the unittest test framework that comes with python, but it is more concise and more efficient than the unittest framework to use. According to the introduction of pytest's official website, it has the following characteristics:

Very easy to get started, simple to get started, rich in documentation, there are many examples in the documentation for reference

Able to support simple unit tests and complex functional tests

Support parameterization

During the execution of the test, some tests can be skipped, or some expected failure cases can be marked as failed

Support repeated execution failure cases

Support running test cases written by nose and unittest

Has many third-party plug-ins, and can customize extensions

Convenient integration with continuous integration tools

Pytest also has a variety of available plug-ins to add more functions and diversity to existing test technologies and test cases. In fact, there are more than 300 plugins available in its active community. The platform is designed to write code that is simpler and has a lower error rate. You can use Pytest with graphical user interfaces such as Selenium and Splinter to make testing easier.

Conclusion

For any programming language, there is no absolutely ideal testing framework. It depends on the comfort of the tester, the needs of the project, and the type of testing required for a particular module in the project. The available automated testing frameworks include linear automation, module-based testing, library framework testing, hybrid testing, keyword-driven and data-driven testing, etc. Each framework has its advantages and disadvantages. The python framework listed above is the most comprehensive automated testing framework.

Pay attention to me and improve it skills, only one step away from being proficient.


Finally: a wave of software testing data sharing!

In the technology industry, you must improve your technical skills and enrich your practical experience in automation projects. This will be very helpful for your career planning in the next few years and the depth of your test technology mastery.

In the interview season of the Golden 9th and the Silver 10th, the season of job-hopping, organizing interview questions has become my habit for many years! The following is my collection and sorting in recent years, the whole is organized around [software testing], the main content includes: python automation test exclusive video, Python automation details, a full set of interview questions and other knowledge content.

May you and I meet and you will find something! If you want to exchange experience in software testing, interface testing, automated testing, and interviews. Follow WeChat public account:[Sad Spicy Strips]Receive a 216-page software test engineer interview book for free. And the corresponding video learning tutorials are free to share! Communication learning skirt:313782132

Recommend good articles:

Packaged as a test engineer with 1 year of work experience, my advice before the interview is as follows

What exactly should I learn in automated testing?

Why not consider Tencent for job-hopping? Talk about a little bit of the past between me and the goose factory

Which is more advanced, automated testing or manual testing?

Novice must see: How to write a qualified test case?

Python login interface test problem record and solution (dry goods)

Guess you like

Origin blog.csdn.net/weixin_50829653/article/details/113991125