In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Concept
Why start with the concept? For beginners, automation may always be regarded as high-end and powerful.
Let's first think about how common functional testing is done: design test cases, and then testers execute test cases to compare whether the actual results are equal to the expected results. If equal, the test passes. If it is not equal, the test fails.
In fact, there is no difference between automated testing and functional testing, automated testing is mainly divided into three levels to automate, unit test automation, interface test automation, web test automation.
Unit test automation
Call the class or method under test, pass in the corresponding parameters according to the parameters of the class or method, and get a return result. The final assertion determines whether the returned result is equal to the expected result. Equal, test passed, unequal, test failed. So, in unit testing,
It is mainly concerned with the code implementation and logic, which, of course, is generally done by the developer.
Interface test automation
According to the interface document, write the design test case, submit the request to the interface according to the test case, judge the status code according to the returned result data, and judge whether the interface test passes or not according to the response msg. Therefore, the interface testing focuses on the data. As long as the data is correct, the function will be more than half complete.
All that is left is to display the data on the front page
Web test automation
Web test automation, in which the test is closer to the user's behavior, simulating what the user clicks on a button and enters into the input box. For example, a login function, the user entered the account password to click where, you can see whether the login has been successful. Web Automation alone doesn't know.
Does the user's click just now take effect? So at this time, it is necessary to prove the data, such as the page will jump to the main page after a successful login, and the page will display "Welcome xxxx". This is the valid data proof of the successful login, so after the web automatic login is successful, it will get this data to make an assertion.
If equal, the test passes. If it's not equal, the test, right? Web test automation focuses on the user's behavior and whether the buttons and input boxes on the page are available.
From the nature of the behavior of testing, there is no difference between functional testing and automated testing. The only difference is that one is done manually and the other is executed by code tools.
Misunderstanding
Many friends will think that with automation, we can sit back and wait for the test report, but there is no such thing. Because a project that can do automation must have been tested many times, and the framework and functions are relatively stable in order to write automated test code; it can not be said that you have mastered automation.
You can go to the top of your life and marry Bai Fumei. It mainly depends on whether the automation framework is practical in the company. for company projects, if the product changes a little every three days and a big change every half a month, then automation can only be said. Maybe your automation script has just started. However, the product has already changed.
So automated testing is also an auxiliary way, the most important thing is to do a good job of functional testing as the premise.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.