Since recent experiments have involved black-box testing through Visual Studio to implement a GUI interface, the internet has queried the conceptual knowledge of Visual Studio for automating testing, and here's a brief introduction to
In the past, people have written unit test cases, and then the developers follow the unit test cases to implement the use case step-by-step, which is a very time-consuming process, and now the pace of the times, people expect no human intervention, can be automated fast completion, so the gradual emergence of the use of coded UI for automated testing of the UI.
The Coded UI uses a user interface to drive automated testing of applications. These tests include functional testing of UI controls. They enable you to verify that the entire app is functioning correctly, including the user interface. The Coded UI is used most of the time to help validate valid logic in the UI layer itself. It verifies the correctness of the value of the control of the user interface.
For the lab class, the students installed VS, found that not all versions can be UI tested, currently, Visual Studio Premium (Premium) and Ultimate (Ultimate) can use the coded UI. The core of any coded UI test is that the UI Map.ui Map can be understood as a user behavior record (for example, a mouse click), which is very similar to the macro we created in the word processor.
We have little contact with writing automated tests, and Visual Studio provides a range of tools for automating testing, unit tests, coded UI tests (Coded UI test), stress testing (Stress test), Web performance testing (web Performance test), database unit tests, and so on, we touch more, should be unit test and coded UI test.
Unit tests:
Unit testing is one of the most basic and widely used tests in Visual Studio. Often developers can choose to create unit tests for a method or a part to ensure that they are logically correct.
The Unit Test tool can be used not only for unit testing purposes, but also as a carrier for acceptance testing or functional testing.
Coded UI test:
Although the unit test framework is suitable for a variety of different tests, it does not provide much support for the implementation of the test code itself. The coded UI can quickly create a framework for UI testing. Coded UI tests run methods, run results, and so on, similar to unit tests.
Automated UI testing that is automatically generated does not address the inherent instability of UI testing. In particular, this coded UI test, which looks for controls and performs actions on them through a containment relationship between UI controls, can cause the test to run incorrectly if the UI is not aligned with the recording when the test is run.
Automated testing of Visual Studio