当前位置:网站首页>Use metersphere to keep your testing work efficient
Use metersphere to keep your testing work efficient
2022-07-07 11:17:00 【Fit2cloud flying cloud】
Editor's note : This paper is about CSDN Blogger weixin_41974278 The original article of .
Link to the original text :
https://blog.csdn.net/weixin_41974278/article/details/124174009
Introduce yourself , I am a testing team of a medical industry company Leader, Leading a 5 Human test team . This team is mainly responsible for the testing of the company's products , Include App test 、 Black box test, etc , It will also cooperate with the R & D department to conduct some white box tests .
Because the product iteration cycle is short , This leads to heavy testing tasks before the launch , Busy with work, there is no time to calm down and think well . It happened that this epidemic was forced to be quarantined at home , The work task is suddenly much less , Just take advantage of this time to calm down and review the problems encountered at work , Also calculate “ A blessing in disguise ” Well .
Our team are all quasi senior test engineers who have worked for more than three years , I usually use it Postman、JMeter Interface 、 Performance testing , I think the efficiency of our testing department is good . Our classmates in the R & D department also have some technical heroes , Code ability is very strong , R & D efficiency is also very high . From the perspective of internal resources , Functional development 、 A functional test 、 Performance testing 、 The efficiency of each link such as requirement review is very high . But from a business perspective ? That's another thing .
Practical problems in testing
First , The problem we face is that efficiency is concentrated locally , And difficult to sustain .
From the perspective of users , Users all hope to realize their requirements or needs as soon as possible , Solve their most urgent problems . But when we switch to this perspective , Although we think the local efficiency is good internally , But users' perceptions are different . in other words , Partial efficiency does not necessarily lead to efficient product delivery .
As an organization , Can the efficiency of each part be transformed into efficient delivery ? Among them, the cooperation between departments 、 R & D quality 、 Test quality 、 Whether rework is required , Will result in “ Local efficiency is not equal to efficient delivery ”. Of course , In order to solve the problem of efficient delivery , Usually before going online , Or set up a project delivery team temporarily when doing the project , The station is also close , In order to solve the problem of communication . This really achieves temporary efficiency , But this efficiency is unsustainable .
second , The tests we have “ assets ” It is scattered and old .
From the perspective of our testing team , The test cases we maintain can be reused in the future , And there will be no quality problems when reusing . We used to call these things “ Test assets ”.
Since it is called as an asset , Then we certainly hope that they can generate positive interest . But in reality , They are often not assets to us , It's debt . It took us a long time to maintain , But it doesn't accumulate assets well . Our team's test cases are scattered everywhere , Some are TAPD On , Some use it by themselves Excel To maintain , Often too lazy to upload synchronization . These are all factors that hinder me from conducting continuous and efficient testing .
Based on the above two problems , I started using MeterSphere One stop open source continuous testing platform . I have communicated with their product team online before , But it hasn't been used properly , I've tried it for a few days and found it more appropriate to my needs , So write this article for your mutual encouragement and reference .
Use MeterSphere The actual process of
MeterSphere Open source continuous testing platform (metersphere.io) It mainly covers test tracking 、 The interface test 、UI test 、 Performance testing 、 Teamwork and other functions . Because it is compatible JMeter As the underlying platform , So there is no technical barrier in use . Don't talk much , Tell you how I use it .
install MeterSphere I won't repeat the process of , There are... On the official website , If not clear, you can refer to MeterSphere Online installation documentation (
https://metersphere.io/docs/installation/online_installation/). Find one 4 nucleus 8GB Of Linux The machine can be installed with one key , Particularly convenient .
After installation , Enter the initial user name and password admin/metersphere, You can log in normally , The login interface is shown in the following figure :
You can see from the navigation box above ,MeterSphere It is mainly divided into the following work modules :
My workbench : It belongs to the enterprise version function , No open source version , The entry to apply for enterprise trial is :
https://metersphere.io/enterprise.html.
Test track : Including test case creation and management 、 Use case review 、 Test plan tracking and defect management . This module allows users to create / Import function use cases , Including review function . In this way, you can get through the test 、 Research and development 、 Department walls of product managers and project managers , Let multiple people participate , Unreasonable demand can be eliminated in the early stage . The reviewed use cases can be sorted into a test plan for implementation , The test plan contains functional use cases 、 Interface and performance test cases . The test plan can also be executed regularly and Jenkins Execute by triggering , It can also be established in the test Bug Correspondence with use cases , In this way, the current test assets are well connected .
The interface test : What surprises me most about this module is the establishment API And Case The relationship between , It greatly alleviates our dilemma of testing asset accumulation . Put all test case assets in API And Case The relationship between , Click on API after , Naturally, you can see the corresponding Case. in addition , This module also includes the implementation of interface testing and scenario testing , Achieve the integration of management and implementation .
Performance testing :MeterSphere The base is JMeter, The user can turn the interface test into performance test with one click , Of course you upload your own JMX And CSV Files can also create performance tests , And it can automatically generate reports .
Report statistics : Show the project use case trend and use case status statistics .
Project settings : Show the information and documents used in the current project , Thus, it is convenient to call .
System settings : Including user and workspace management , You can also configure messages and nails 、 Get through with enterprise wechat , It also supports configuring external requirements , docking Bug platform , for example TAPD、JIRA、 Zen way, etc .
■ Create functional use cases
Get into “ Test track ” modular , Get into “ Function use case ” You can import and create test cases . Fill in the basic information according to the prompts 、 Step details , You can also edit the dependencies with other functional use cases , Associate with other interfaces 、 Corresponding relationship of performance test , You can also upload attachments .
■ Use case review
Then we enter the function review stage . This is also a function I like very much , Let R & D 、 The test and even the father of Party A can participate in the project review stage . Everyone can leave a comment , Unreasonable requirements are eliminated in the review stage , It reduces the possibility of subsequent rework . This can effectively solve the problem I mentioned earlier “ Local efficiency is not equal to business efficiency ” The problem of .
After the use case review , The use case passed the review can be considered as executable . Then you can carry out the test plan . This process is more in line with the collation logic .
in addition ,“ The interface test ” The module shows API And Case The hierarchy of , This function really helped me a lot .
I take /userlogin Such an interface will explain to you . Obvious , This is a user login POST The interface of the way , We type in {username:$username,Password:$Password} Of data Group test , After passing the test API The hierarchy is over .
But the little buddy who is familiar with the test must know , The greater workload lies in the subsequent different situations Case Level test . For example, take the one just /userlogin Interface examples , We use the correct user name 、 Is the test over after the password test succeeds ? Obviously not , We will also try to login with the wrong user name and password , Whether the error message can be returned normally , Whether the blank password login will prompt “Please enter password”. If only key login is allowed , Enter the correct password to check whether the login will take effect .
It can be said that a simple user login API, Dozens of methods will be derived , Over time, this Case The accumulation of will cost a lot of manpower to manage . You say no management , Do you want to rewrite it if you want to use it in the future ? You say management , Who will bear the high management cost ?
MeterSphere That's a good way to solve the problem . It is the API And Case It becomes a parent-child relationship , First we pass Swagger UI Import MeterSphere Of API, find /userlogin Interface , You can see API And Case Two dimensions .
After clicking in, we create two Case, respectively “ Enter the correct user name and password , Whether the login success is displayed normally ” as well as “ Whether the wrong user name and password are displayed normally, login failure ”. You can see the correct user name and password ,Case It was a successful execution , Enter the wrong username and password , Expected to return wrong Reponse Code, It also shows that the execution passed .
■ Use secret correctly Case
■ Wrong secret Case
You can also set assertion rules , Designate this Case Expected output Response Code The value is 500, In this way, even if the execution fails , But in Case The execution level is also judged to be successful .
■ /userlogin Corresponding Case
So we start from the previous API and Case The level of parallelism has become today API and Case One to many relationship , It simplifies our management of use cases , Enhanced reusability . also ,MeterSphere The characteristics of platform make the test assets of all our users unified 、 Persist , Achieve what I said earlier “ Testing continues to be efficient ” Idea .
MeterSphere It also supports the scenario arrangement of interface use cases . When it passes API and Case Interface after two-layer test , You can think connectivity is ok , And it can return the expected value under different limit conditions . We can test the scenario of joint debugging and parameter transmission between interfaces .
in addition , What surprises me more is MeterSphere The interface test of can be converted into performance test with one click . So you don't have to go from Postman After the test , Put the script 、 Copy the interface information into the performance test tool , There is no need to consider the compatibility of script functions between the two tools , It greatly reduces the learning cost and the difficulty of getting started .
■ Interface test is transformed into performance test
■ Automatic generation JMX file
summary
After this trial , In my submission MeterSphere It is a testing platform tool suitable for medium and large-scale teams . It can manage the test assets hierarchically , Covers performance testing 、 The interface test 、 Basic test capability and use case management of function test . also , be based on MeterSphere The ability to platform itself , You can use user data in a workspace 、 Categorize project dimensions , Ensure data sharing and isolation .
however ,MeterSphere At present, there are few out of the box protocols for the project , Only common HTTP、TCP、Dubbo And SQL form , The performance report is also relatively simple , Not included JMeter Advanced configuration chart for . Looking forward to the future MeterSphere Our product team can optimize in these places .
边栏推荐
猜你喜欢
Socket socket programming
【pyqt】tableWidget里的cellWidget使用信号与槽机制
Unity script generates configurable files and loads
The database synchronization tool dbsync adds support for mongodb and es
Opencv installation and environment configuration - vs2017
JSON format query of MySQL
如何在博客中添加Aplayer音乐播放器
关于SIoU《SIoU Loss: More Powerful Learning for Bounding Box Regression Zhora Gevorgyan 》的一些看法及代码实现
分布式数据库主从配置(MySQL)
通过 Play Integrity API 的 nonce 字段提高应用安全性
随机推荐
RationalDMIS2022阵列工件测量
PR Lecture Notes
Shardingsphere sub database and table examples (logical table, real table, binding table, broadcast table, single table)
关于测试人生的一站式发展建议
uniapp 在onLaunch中跳轉頁面後,點擊事件失效解决方法
网络协议 概念
Web端自动化测试失败的原因
基于DE2 115开发板驱动HC_SR04超声波测距模块【附源码】
Verilog design responder [with source code]
Unity script generates configurable files and loads
科普达人丨一文弄懂什么是云计算?
[untitled]
The database synchronization tool dbsync adds support for mongodb and es
Go-Redis 中间件
[untitled]
Ping tool ICMP message learning
Bookmarking - common website navigation for programmers
Poj1821 fence problem solving Report
[untitled]
基于Retrofit框架的金山API翻译功能案例