当前位置:网站首页>[best practice] learn how eolinker helps Telecommuting

[best practice] learn how eolinker helps Telecommuting

2020-11-09 19:11:05 Wang Shu next door

2020 so far , For various reasons , More and more enterprises choose to work remotely .Eolinker Combined with our long-term experience in remote R & D cooperation , For the enterprise to launch API Managing remote collaboration Guides , The following solutions are not only in Eolinker Inside , It's also proven in many customers , Hope to help you quickly understand how to API Management and automation testing are used in the actual remote office .

API The development process of Management 、 Pain points and solutions

in the past , Many R & D teams don't pay attention to API management , Think API Management is nothing more than management API file , Only need to use word Document or wiki hold API Describe it , Wait until you need teamwork API Document by file or wiki Send it to the front end and tester . By this time API Extensive management , We call it 1.0 Time .

But with the spread of agile ideas , People are beginning to find the traditional API Management only focuses on management API Documents don't work , There are obvious problems :

  • 1、API The documentation is not standardized : Lack of unified document format , Abbreviation 、 Omit or leave out the details ( Developers always feel that they can understand it ).
  • 2、 Storage platforms are not unified : Each project team in the company has its own usage habits , Even within a project, there can be multiple API Management tools , The platform is not unified, which leads to the failure of efficient maintenance and collaboration .
  • 3、 The document is not updated in time : Development teams are used to developing first and then filling in documents , Think of documentation as an add-on to development work , The update is not timely .
  • 4、 Change history does not record : Due to the lack of timely maintenance of documents , When you need to go back to check the project or make work handover, you will find that it is better to look at the document than to look at the code , Instead, it slows down the progress of work .
  • 5、 Testers can't write test cases quickly : Because of tradition API A document is just a document , Testers also need to use other tools to write test cases .
  • 6、 It doesn't reduce communication costs : For the above reasons , front end 、 Back end 、 test 、 Members such as operation and maintenance often have disputes due to unclear documents , Sometimes it increases the cost of communication .

In order to solve the above problems 2.0 Tools of the times , Start thinking about how to combine development with testing , For example, code annotations generate API Document to reduce the burden of documentation for back-end development 、 Can be based on API Document directly for testing, etc . The most outstanding product of this era is Swagger、Postman、Jmeter、SoupUI Products such as . As the concept of integration of R & D and testing is promoted , These products are gradually becoming the mainstream API Management and testing tools , With a huge user base .

However, remote collaboration was not popular when the above products appeared , So its product design is basically based on local development and personal use , Therefore, when encountering more and more high iteration speed and quality requirements, it seems to be unable to do as one wishes , The following problems arise :

  • 1、 The front end development schedule is subject to the back end : pure API Lack of documentation Mock API, The front end needs to wait for the back-end development to get the test data , It is time-consuming and laborious to construct test data by yourself .
  • 2、 Document changes are not notified : Back end development has changed the code and interface, used to oral communication , Instead of explicitly pointing out the changes through documentation , This leads to the high cost of later communication .
  • 3、 Interface testing is not convenient : You need to look at the interface document and use another tool to test , If the interface changes , Written tests are also invalid , Increased duplication of work .
  • 4、 The test is repeated : You need to look at the interface document and use another tool to test , If the interface changes , Written tests are also invalid , Added duplication of work .
  • 5、 You can't share your work : Each tester writes test scripts with stand-alone testing tools , But there's no way to share and collaborate .
  • 6、 Testing is not automated : Always wanted to promote automated testing , But it didn't really work , Every day “ Dot ” Still consuming a lot of testing team energy .
  • 7、 The test effect cannot be quantified : Unable to accurately understand the test results , No one can say today 、 yesterday 、 Last week, 、 How are the tests this month , What's the improvement compared to before .
  • 8、 Testing is passive : Testing is always at the end of the line , Unable to participate in project discussions , Can't do fast, wide-range regression testing , I can't even finish the test on time , Lead to project delay or go online with fear .

And these products don't solve API Key issues in the process of R & D collaboration : How to develop 、 test 、 Operation and maintenance 、 Teamwork is a combination of the four , Become a team friendly 、 agile 、 A unified API Management platform . And can be used for follow-up API monitor 、 O & M provides direct support .
1

We will achieve development 、 test 、 Operation and maintenance 、 Cooperation and other four elements become 3.0 Products of the times . and Eolinker since 2017 Since its establishment in , Has been committed to building API Life cycle management solutions , At present, it is the largest online in China API R & D management platform , The line under the flag SaaS Products and offline privatization products include :
API Build platform (API Factory)
API R & D management and automatic test platform (API Studio)
API Monitoring platform (API Monitoring)
API Microservice gateway platform (API Gateway)
API Open platform (API Open Platform), Upcoming release

Eolinker API Studio Theoretical basis : Document and Test Driven Development (DTDD)

I believe you have already heard of the following development model : Document driven development (DDD) And Test Driven Development (TDD).

Document driven development refers to writing documents before development , Define functional requirements 、 In parameter out parameter definition 、 After exception handling, we can develop it . This is just like we need to understand the requirements of the questions before we do the questions , Otherwise, if you don't review the topic, you can easily end up reworking .
Test driven development refers to testing the solution before development / Write the use case , Only develop the function that can pass the test successfully , Continuous improvement if the test fails . It's like we know the standard of passing the exam before we take the exam , If there is no standard, a random answer will definitely lead to no good results .

The combination of the above two development methods is Eolinker API Studio Design concept of : Document and Test Driven Development (DTDD). In a nutshell :

Replace oral conventions and note taking documents with standard documents , Let's develop 、 test 、 Operation and maintenance 、 Collaboration has a track ;
Quickly use test results to drive development progress , Let the team communicate more fully 、 Management is based on facts , Achieve agile development .

therefore , stay Eolinker API Studio in , Almost all collaborative work revolves around API The document is in progress , When you create API After the documentation , You can always check API Changes to 、 according to API Document launch API test 、 To write API The test case 、 establish Mock API、 Conduct API Automated testing, etc .

We have been in contact with a large number of customers and found that , use “DTDD” Mode is better than simple use of TDD or DDD The effect of the way is better , Compared with what was mentioned before 2.0 The R & D efficiency and project quality of the times should be improved several times .
Therefore, we strongly recommend that you try to work in this way .

First time to know API Studio

Create the first one API Management project

stay Eolinker API Studio in , be-all API It's all managed in a project way , So first we need to create a API Management project . At the same time, we also provide one click import function , Can quickly move Swagger、Postman、RAP、YAPI Data in the product is quickly migrated to Eolinker in .

establish API file

stay API Studio in , You can create API file :

1、 Manually create API file ,API Studio Provides a very comprehensive API Document format , Be able to record your API Information . This approach is suitable for all users , And it's the way we recommend .
2、 Associate project with Swagger URL,API Studio Automatically get the latest from this address API file . This is the way it's been used before Swagger, And users who tend to document in code annotations . But this method will bring the problem of code intrusion , Add a lot of irrelevant information to the code to increase maintenance costs .
3、 Associate project with code repository ,API Studio Automatically scan code annotation generation from code repository API file . The current approach supports Java as well as PHP Two languages . This method also brings the problem of code intrusion .

When we create it API After the documentation , Can be in API Studio See clearly API document information , And it can be tested on this basis API、 To write API The test case 、 To write Mock API、 management API Version and so on .

One click API test

When we create it API After the documentation , You can do it right away API To test ,API Studio The following main features are provided to help testers quickly launch API test :

  1. Support local testing 、 LAN test 、 Online testing, etc ;
  2. Support one key switch test environment , Use global variables 、 Add additional request parameters 、 Change request address, etc ;
  3. Support editing directly in the interface JSON、XML Request data , No more handwriting JSON、XML And so on ;
  4. Support saving test data as test cases , In the future, you can use test cases directly for testing ;
  5. Support batch testing API, For example, test the login interface and return real-time test data ;
  6. Support to write code for signature during testing 、 encryption 、 Generating random data, etc ;

The figure below : In the test interface, you can directly write JSON data .

The figure below : Switch the test environment in one second and launch the test .

Batch test multiple API Use cases , Liberating the testing workforce

In the old ways of collaboration , Testers are always at the end of the line , Unable to participate in project discussions , Can't do fast, wide-range regression testing , I can't even finish the test on time , Lead to project delay or go online with fear .

stay API Studio in , Because collaboration is based on API The document is in progress , When back-end developers will API After the document is written , The tester can step in right away , stay API Write test cases based on documents , Move testing forward .

When API After development , The tester can push API All test cases are tested , And get detailed test reports . Back end development only needs to see the test results to know its own API Whether the test requirements are met , If there is an exception, it can be targeted to improve .

When API After the change , The tester can do it with one button API regression testing , Truly emancipate the labor force .

By , Back end and testers can communicate more closely , Let test driven development complete .

The figure below : Batch test API A variety of data conditions , And get detailed test reports , You can see in the report API Abnormal reason .

structure Mock API, Get the front end out of the back end

In waterfall development mode , If the front-end developers need to do page docking , It needs to be done by the back end first API Development of , As a result, the progress of front-end and back-end development will affect each other .

adopt Mock API, You can write it in advance API Data generation rules for , from API Studio Dynamic generation API Data returned by . Developers access Mock API To get the data the page needs , Complete the docking work .

Mock API Support to return different... According to different request parameters HTTP Status Code、Header、Body Data such as . You can do it in one API Create multiple Mock API , Simulate various requests from the front end , It is convenient to check the front-end logic .

When the project is officially released , Just put the Mock API Replace the address prefix with the actual access address .

such as : In the same project Mock API The address prefix of is the same ( Such as mock.eolinker.com/uasyd1/…), So you can put Mock API As a global variable , When the project goes online, you only need to replace the value of the variable to change the whole project API Request address prefix .

The figure below : The API Created multiple Mock API, The front end can pass different request parameters to get the corresponding return results , For example, the user name is jack liu Log in successfully , The user is called percy Login failure or random string .

When API Automatically notify relevant members when the document changes

Many users are maintaining API when , I often meet API The document has changed , But the front-end and testers don't know about . To solve this pain point ,API Studio Provides change notification function , When API In case of any change, relevant members will be informed automatically by mail and on-site letter , And show the changes .

And in API Studio in , We will API The state of is divided into the following stages , Convenient for members to view API Document API The current state .

combination API The function of change notification , We will be able to achieve :
1. When API The status changes to “ Development ” when , Notification back end development ;
2. When API Turn into “ docking ” when , Inform the front end to dock ;
3. When API Turn into “ test ” when , Inform the tester to test ;
4. wait …

The figure below : Set when API Delete or exception , Inform a member of .

Remote collaboration , Direct pair API Comment on the document
When you collaborate remotely , Can be directly in API Post comments on the document , All communication will follow API Documents are kept and sorted by version , Instead of being scattered in various chat tools . In this way, we can avoid the waste of time when we can't find the basis for later communication .

The figure below : stay API Comment directly in the document , also @ Another member of the project looks at .

see 、 Roll back 、 contrast API Editing history

API Studio It also provides a very powerful API Version management features , You can roll back to any time at any time API Document version , And you can also compare the differences between the two versions .

When you can't communicate what's new with words , Try version comparison ~

as follows : Current version compared to historical version , Some parameters are deleted , It will be marked in red in the interface .

besides , also …

API Studio There's more to it , You can implement strict personnel rights management in the project 、API Status code management 、 Project document management 、 Test environment management and so on , It's all about making teamwork easier and more efficient .

Advanced ! adopt API Studio make API Automated test platform !

Get to know the market leader quickly API automated testing

stay API Studio It also provides the leading API Automatic test function :

1. Zero code automated testing : You don't need to write any code API automated testing ;
2. Code pattern automated testing : Write a small amount of Javascript Code can be used for automated testing of complex processes ;
3. Support the operation of database : Support the operation of database during the test , Perform data insertion 、 Delete 、 Editing and other operations ;
4. Data driven testing : One test case supports testing multiple sets of data , Generate test reports separately ;
5. Automatically generate test reports : Each test can generate detailed test reports , Support online view and offline download ;
6. Support timed test tasks : Set timer to execute test task automatically , Send the report to the designated person's email address ;
7. Support Open API Trigger test : Can pass API docking Jenkins, At any time API automated testing ;
8. Very low learning threshold :15 You can start training in minutes API automated testing ;

Can help you quickly solve the following common problems :

1. Regression testing of the project is required before requirements are released , The coverage of traditional testing methods is narrow 、 inefficiency . Automated testing can be used to improve test coverage and efficiency ;
2. Changes in product demand / After the code changes , The tester cannot determine the scope of the test . Automated testing can be used for large-scale regression testing to ensure that the basic business is normal ;
3. The traditional test method has a long cycle , Not every day 、 Every hour 、24 Run the test at any time , And it depends on professionalism , The test results are unreliable . It can be used API Timed test tasks for automated testing may be API Studio Integrated into the Jenkins On , Implement code submission to trigger the test and get the test report in real time .
4. There is a lack of collaboration among traditional test team members , They don't know each other's test cases 、 The test script 、 Test results, etc , Lead to duplication of labor . It can be used API Studio Realize online collaboration of test team .
5. The test team uses API Studio Routine maintenance API After automating the test case , It can effectively solve the above problems , Help test team improve testing ability and efficiency .

stay API Studio in , We provide UI And code pattern two test case writing patterns :

1.UI Pattern : Support editing through interface mode API Automated test cases , You can do more complex things without writing code API Automated testing work .
2. Script mode : By writing Javascript Code , Can complete complex API Automated testing work .
For reasons of length , We're just going to show you API Studio Automatic test results of , For details, visit Eolinker Official website .

As shown in the figure below , You can edit through the interface API Testing process 、API Data management between 、 Check rule returned , Even insert database operations , Then you can get the test report with one click .
14

In script mode , You only need to write a few lines of code to initiate the test , And support from API Document automatically generates test script !
15

We can choose multiple test cases , One click batch test and get test report .
16

Trigger in more ways API automated testing

API Studio Provides a variety of trigger methods for automated testing :

Manual trigger ;
Timing trigger ;
Open API Trigger , But to receive Jenkins And so on .
Flexible use can create a test efficiency artifact belonging to you !

Learn more about Eolinker Product information

The outbreak of the epidemic has hindered the operation of countless enterprises , Above is Eolinker Combined with our long-term experience in remote R & D cooperation , For the enterprise to launch API Managing remote collaboration Guides , The following solutions are not only in Eolinker Inside , It's also proven in many customers , Hope to help you quickly understand how to API Management and automation testing are used in the actual remote office . We want to be able to do something about it , Help more enterprises from the traditional 、 Free from inefficient development .

Official website :https://www.eolinker.com/

版权声明
本文为[Wang Shu next door]所创,转载请带上原文链接,感谢