[Development artifact] Automated testing, use Apipost!

product description

Product Introduction Apipost is an integrated R&D collaboration platform that meets the business needs of the entire R&D life cycle. Determine the requirements from the product manager, discuss how to design the interface structure at the front and back ends, design the mock in advance and share it with the front end; the back end enters the code development and debugs whether the interface meets the expectations; after the interface is correct, the front and back ends are jointly debugged and delivered to the test ; Testers perform automated smoke testing based on the developed interface. The entire R&D process is efficient without waiting, and communication is convenient, effectively improving the team’s R&D efficiency by 35%.

For an Internet company, testers are an indispensable role in the company. But there are countless people engaged in software testing, and every year many graduates are involved in the army of the Internet. If a tester's ability is only a little bit, he will naturally be eliminated by the new generation of "roll kings".

Therefore, mastering automated testing has become an only way for many testers to improve their workplace competitiveness. However, automated testing in the usual sense has a relatively high threshold and requires certain coding capabilities. For example, Jmeter, which we usually use, has powerful and comprehensive functions, but it has also been evaluated by many testers as having difficulty in getting started, cumbersome operations, and incomplete and clear test reports. , found that the problem is not easy to trace back and find other problems.

So is there a tool that allows testers to automate testing without writing code, and can generate comprehensive and clear test reports that are easy to use?

That's the start of our key topic for today: Apipost - Automated Testing!
insert image description here

In the automated test of Apipost 7.0, it is divided into three modules: "test case", "test suite" and "test report". The whole process does not need to type code by hand, and still complete the task! Let me introduce to you what problems these three modules can solve for us:

test case

Usually we add interfaces and controllers (conditional controller, count controller, while controller, wait controller, global assertion, script) to the test case to simulate real business scenarios. After the configuration is complete, it can be executed according to the process. interface, and will automatically generate clear and comprehensive test reports.

Is it troublesome to transport the interface to be tested? Apipost one-click add

In Apipost6 and previous versions, users can add APIS interfaces in the test module with one click. This interaction method is very intuitive and fast, and is widely praised by users. Therefore, we continue to use this method of adding in version 7: Click "API Add" "Device", the directory synchronized with the APIS module will pop up on the right, we can select the interface from it and copy it to the current process configuration.

[External link image transfer failed, the source site may have anti-leech mechanism, it is recommended to save the image and upload it directly (img-jI0LxdVX-1662341841445) (https://rhl469webu.feishu.cn/space/api/box/stream/download /asynccode/?code=NDE4YjliYjk0NDdhYzYzMzVjOTdlODZmZjIwMzkyZTVfNFYyeEZCWjdjV01CMmlXaER4MHo1N0ptS3BBc3RxczZfVG9rZW46Ym94Y25ZTU9wZGlaOWYyMFNGN210QkEzVkFoXzE2wNjNjIzNNAWDE4Md6Md]

Can't write code? Visually operate knock-free code

After adding the interface to be tested, we can continue to configure the controllers required by each node. Apipost provides the following six control methods, covering 90% of test scenarios, allowing testers to complete automated testing without writing code.

1. Conditional controller: Judge whether a variable satisfies a certain condition, thereby determining whether the interface under the controller runs.

[External link image transfer failed, the origin site may have anti-leech mechanism, it is recommended to save the image and upload it directly (img-Jnax1PdV-1662341841445) (https://rhl469webu.feishu.cn/space/api/box/stream/download /asynccode/?code=YmZkYWM4MWM3YTAwM2NhMDljNTAxMmZkYWRjYWMzY2VfWlFRRDRxNmhyWWhETnB5R0pYOFM0OTJNdDBZdTFOU3VfVG9rZW46Ym94Y25ZMml2QXowVMFW9lR2NXWUY0NGhoTnloXzE2MjN0QMD9NloXzE2MjN0QMD

2. Times controller/while controller: Cycle all interfaces under the controller according to the specified loop method.

[External link image transfer failed, the source site may have anti-leech mechanism, it is recommended to save the image and upload it directly (img-4Cpoh6FK-1662341841446) (https://rhl469webu.feishu.cn/space/api/box/stream/download /asynccode/?code=ZTY1MWRmYjE4ZDdjNmM4YzJlNzZiZDMzMTMxZjBlZjFfYWVtaFhFSmd1ZnJLY0VsRWtGbVlaOHlhZ2JkMVhyU0NfVG9rZW46Ym94Y24yUGljeFRJV0F4VmJ6QUV6Y1BZRjNkXzE2NjIzNDE4MDA6MTY2MjM0NTQwMF9WNA)]

3. Wait Controller: Insert a wait time between process configurations.

[External link image transfer failed, the source site may have an anti-leech mechanism, it is recommended to save the image and upload it directly (img-Zkzkd8Hl-1662341841446) (https://rhl469webu.feishu.cn/space/api/box/stream/download /asynccode/?code=NWMwMzYxMmU3NjgwMDc5ODkzZmUwYjc3NmEyMDc0ZTJfYmY5VjNIdUtsRzVGR21FcnRRWG9YYTFXcFI4N01KMGVfVG9rZW46Ym94Y25CWTh5Sk44T01yTTBxbjdjbGcyVDNjXzE2NjIzNDE4MDA6MTY2MjM0NTQwMF9WNA)]

4. Global Assertion: Assert the entire test plan to verify that the test results meet expectations.

[External link image transfer failed, the source site may have anti-leech mechanism, it is recommended to save the image and upload it directly (img-XFxYi4iM-1662341841446) (https://rhl469webu.feishu.cn/space/api/box/stream/download /asynccode/?code=MjIxMmUxMDAwZDJjNTVjNzViZDc3ZDk3OWQ5YWMwN2JfVE5udGdMNjBrTDd2R1NwMmk3WDFxODdSd05ZRmp2RkhfVG9rZW46Ym94Y241eUZHbkhncExvSk5XR0o4NnJWc0pnXzE2NjIzNDE4MDA6MTY2MjM0NTQwMF9WNA)]

**5. Script:** Function: Support custom scripts, Apipost provides commonly used scripts.

[External link image transfer failed, the source site may have an anti-leech mechanism, it is recommended to save the image and upload it directly (img-IllCpytu-1662341841446) (https://rhl469webu.feishu.cn/space/api/box/stream/download /asynccode/?code=Y2QwZTI0MzMzN2I1NjZmMGRkNWZiMzVhOTI4NzcxNzdfbkc2UnNKSGc4VUtWSWhFcEVMaEFRRmR6cGg2cnh1SkVfVG9rZW46Ym94Y25nMm1jM3RUVnFkNFR1VTBQYlRpWWNnXzE2NjIzNDE4MDA6MTY2MjM0NTQwMF9WNA)]

The data is huge and the crash is detected? Batch validation of test data

As a tester, the most difficult stage is probably the interface test execution stage. For a certain interface, there is a large amount of test data that needs to be verified in batches. It is too time-consuming and labor-intensive to change the request parameters one by one. Using parameterization to process data in batches will be more efficient.

In this regard, we have launched the function of batch importing test data, which supports parameterization of external import files. Currently, it supports json, txt, and scv for import, which can easily import the data of the process test for testing, which is a great addition to the work of testers.

[External link image transfer failed, the source site may have an anti-leech mechanism, it is recommended to save the image and upload it directly (img-gs92o6LA-1662341841447) (https://rhl469webu.feishu.cn/space/api/box/stream/download /asynccode/?code=YTk3NDg1ZmJiNmYzNDkyYjZkYTI1ODBkNzFiMzIyMGRfZm5rTG81QzhGNlRJZFFWdlk2ZUhDNzZLNG53bTNaNjVfVG9rZW46Ym94Y244OUhiTWZvSEY0VTVRM1BVWTJ2Y1VjXzE2NjIzwd9mD]]

The test is too long and there are too many tasks? Execute multiple plans at the same time

After configuring the test process, click "Save and Execute", we can see the running progress bar and the interface information that has been tested. You can also switch pages during the running process, and support multiple test plans to run at the same time.
insert image description here

[External link image transfer failed, the source site may have anti-leech mechanism, it is recommended to save the image and upload it directly (img-JAqjrliL-1662341841447) (https://rhl469webu.feishu.cn/space/api/box/stream/download /asynccode/?code=YWYxODQwMDYxYTAxZGFlNzdiNmMzOTYyY2RkOWFmMjZfRnE3Z09KZmJLV1RhaGpLdm5JNHlYWDNJNktqdkZjZzVfVG9rZW46Ym94Y25LYVE2UlFaU2xrZUdic0hwTBDDVWNiXzE2MjNjNjIzNmD]

test suite

The test suite consists of multiple test cases, which supports combining multiple use cases into a combination for overall testing, and can generate test reports for this combination. The specific operation process is similar to the test case, so I won't repeat it here. Those who want to learn more can go to the Apipost official website https://wiki.apipost.cn/document/00091641-1e36-490d-9caf-3e47cd38bcde, Check out our usage documentation.

testing report

Test report summary display

The test report section is used to view the saved test case reports and test suite reports. We can perform multiple selection, view, and delete operations on the specified reports, and support exporting to HTML format.
insert image description here

Report details are comprehensive and clear

In the test report details page, we can see the execution result and interface information of the report. Click the specified interface, and we can also see the assertion content and interface details under the interface.
insert image description here

[External link image transfer failed, the origin site may have anti-leech mechanism, it is recommended to save the image and upload it directly (img-yX5F8VcL-1662341841447) (https://rhl469webu.feishu.cn/space/api/box/stream/download /asynccode/?code=M2Q4Yjc2ZjNiNzcxMGYwZjBhOTIwNDBlNTQ5MzAyNjdfZnVFZDdKb1N1R1dRdlNtUU9IRzhqU0Jnejl2VnZrSk1fVG9rZW46Ym94Y25pdHpKcFlqVkFsNUNrMXJweWJQS0xjXzE2NjIzNDE4MDA6MTY2MjM0NTQwMF9WNA)]

Quickly locate test results

In the test report of the test suite, you can even start from the passing of the "test plan" and trace all the way to the test result of an assertion of an interface under the plan. It can be said to be very detailed. Track the bug and find out. .
insert image description here

[External link image transfer failed, the source site may have an anti-leech mechanism, it is recommended to save the image and upload it directly (img-vIXEvetR-1662341841448) (https://rhl469webu.feishu.cn/space/api/box/stream/download /asynccode/?code=Y2Q2Njk1ZjAzOGU0ZGVkNTViZDQwMGFiMGRiOWQyNmRfZFdxZExBc3MzWDBqenlEMTdKN0R6VnNSRzVkVEdpaTlfVG9rZW46Ym94Y25kdmYyWVY4UTN2NXJQelkzQjQ3OHhmXzE2NjIzNDE4MDA6MTY2MjM0NTQwMF9WNA)]

With such a convenient and easy-to-use test tool, test students can finally get off work earlier!

Support editing before sharing

Although Apipost can generate such a detailed report, when I want to share it with the leader, I still want to make some explanations and summaries of some data. Do I need to "marriage" a document?

Naturally, Apipost understands you. We have built a Markdown edit box in the test report to facilitate reporting and presentation of work results. After editing, you can share it directly.
insert image description here

[External link image transfer failed, the source site may have an anti-leech mechanism, it is recommended to save the image and upload it directly (img-Hgfd7rsQ-1662341841448) (https://rhl469webu.feishu.cn/space/api/box/stream/download /asynccode/?code=NDQyNTIxNWMxYmU4NTY1Y2M5ZDJlZjkyMDc0YjhmNGFfdUNHNjhKUW9KRU0zcGEzSVdaZG95VVdpdm1RTE9OVGhfVG9rZW46Ym94Y25tZzAxWUJ6bFRyazBsMkxmWDAwNnloXzE2NjIzNDE4MDA6MTY2MjM0NTQwMF9WNA)]

Easy to find test records

Sometimes our test results are not saved, so how to trace the unsaved test records? Apipost will save nearly 100 execution records of the current test for you, and we can view the test results of this record in the following figure.

[External link image transfer failed, the origin site may have anti-leech mechanism, it is recommended to save the image and upload it directly (img-FnbvMnJU-1662341841449) (https://rhl469webu.feishu.cn/space/api/box/stream/download /asynccode/?code=YjQwNDA3YzM2YjQxOWJkMGI0MGJkYjQ2ODJkMzI5YzdfbVVucXJqQ3ZWVW9PNkFTdnViMDIxSm1pRkltVVpmRTJfVG9rZW46Ym94Y25ueVRiMnRwZ0ljSUlRNEVaY1Y5WXRmXzE2NjIzNDE4MDA6MTY2MjM0NTQwMF9WNA)]

The first step in learning automated testing is to understand the operating principles of automated testing, get started quickly to complete tasks, and make results one step faster. It is recommended that friends who want to learn automated testing can use the automated testing function of Apipost first. This is really the fastest and best testing tool I have seen so far. There are many details that I can't finish here. Interested friends can go and experience it, it is really a good tool for promotion and salary increase

Guess you like

Origin blog.csdn.net/weixin_42469135/article/details/126698664