Hello everyone ~ I am a
Milo
!
I'm from 0 To 1 Build an open source interface testing platform , Also writing a set of correspondingcourse
, I hope you can support me more .
Welcome to my official account.Milo's test diary
, Get the latest articles and tutorials !
review
In the last section we discussed How to end an asynchronous task
, We haven't fully applied it to the project yet . But that's okay , We have more urgent things to do :
Due to the completion of data-driven , Cause us to execute case It's time to bring the environmental data , So the previous online execution case The function can no longer be used .
The above problems will occur , We need to transform the front and back end .
Let's see the effect first
To perform a single case You must choose the environment .
There will also be an environment when multiple choices are made .
perform 2 After data , A simple test report will appear .
Retrofitting the back end
We support batch case And single case Executive , For historical reasons, we have encapsulated 2 Interface :
/request/run
/request/run/multiple
Let's look at the corresponding method :
Due to batch execution , A test report will be generated , In the test plan section, we have supported the environment , So we can just pass in the front-end parameters .
run Method , Because we supported Data driven
, So a case There will be multiple data results . this err Your judgment needs to be removed , Because the error message is already in result
Inside the , You can't stop other data just because one piece of data is wrong .
Finally, we need to compare the test data with test result
correspond , So we built a ans Dictionary , To hold Test data
And test results .
Transformation front end
Need to change TestResult Components
When it comes to map When ( The explanation is single case Multiple data , Render N individual tab)
Change the execute and execute use case buttons
Make the button a drop-down menu type , And put env Parameters bring in .
The execute button in the page also needs to be modified
In this way, we have completed the corresponding execution functions , Everyone can be in edit case
The page was tested .
That's all for today , Let's see you next time .