How to develop students to conduct self-assessment

Recently, several students who were doing development asked me how to test, or how to test a system. This question seems simple, but in fact it has a wide range, especially without knowing the company's business and system, it is impossible to give a correct answer. If I tell you that it is to do functional performance safety testing, it is actually perfunctory. Just like you asked me how to get 100 points in the test, I answered that all the questions are correct.

Developing self-test is now gradually becoming a prerequisite for testing, and most development students are no strangers to this. However, many companies still face the problem of not having test students, some internal systems not connecting with test students, or the company’s testing culture is not popular enough. At this time, development students need to conduct all tests by themselves, but they have no way to start. One is that the developers may only know the function of the module they are responsible for, but not the process of the entire system. The other may not understand what else needs to be paid attention to besides verifying the normal functions.

1. Do you know this industry?

Every company has its industry. Even if it is an outsourcing company, the projects you do will also have an industry affiliation. Financial securities, education platforms, municipal platforms, e-commerce, etc., the business of each industry is different. If you think that you are only responsible for typing codes, why do you need to understand industry knowledge? Wouldn’t it be good for business people to know these things? Business people can do whatever they want us to do. In fact, no matter what position you are in, combining industry knowledge can help you understand the demand background faster and better, and at the same time allow you to actively explore and supplement implicit needs.

For example, if you are taking over a teacher system now, you need to add the function of editing test papers online, and then you can finish it with swipe and swipe. If you have a little understanding of this industry and the functions of other similar systems, you will think that this test paper should be associated with a certain courseware like other files; or whether this test paper should have a download function is more reasonable ; If you want to directly quote a certain question in another test paper, is it okay? In fact, the design method is not the same. And if these problems are found after the test or even acceptance in the later stage and then adjusted, the code will be changed to be ugly, and if it is serious, it may need to be redesigned.

2. Do you really understand the function of the system?

Because each development student is usually familiar with the module he is responsible for. For example, I am responsible for writing an interface that provides data. I want to provide xxx data. When there is no such data, I return 400, and the data is not found. Then the design of caller A is to get the interface to return, return not found data when receiving empty, and return system exception when receiving other results. And this caller A and caller B are a registration module. When caller B requests A with a non-existing account, it actually receives a system exception, which is illogical. This example may not be very suitable (for projects with detailed interface documents, such problems may not occur), but here I want to show that you need to know how each interface, module, and function you provide is called. Yes What role does it play, and what is a complete process like. If the development of each module only focuses on itself, it will be a disaster when the whole process is strung together.

Therefore, when performing self-test, you should not only focus on the implementation itself, but analyze and run it in combination with the entire system.

3. Have you written unit tests?

The most basic test for development students is unit testing. But many developers will resist, thinking that unit testing has little effect. The role of unit testing is not emphasized here, but when you refactor the original code and check whether it affects other functional modules one by one, the cost is huge, and it is easy to miss, and there are unit For testing you just need to run the unit tests.

Although the cost of writing such a unit test itself is already very high, it can be used unlimited times. Compared with the unknowns and risks of each refactoring, which one is the lowest cost?

4. Has your code passed static scanning?

Static code scanning can quickly analyze and verify code without running the project, identifying critical vulnerabilities or errors that lead to system failures, poor reliability, system vulnerabilities, or unsafe conditions. Many off-the-shelf static code scanning tools are available, and some problems that can be compiled but do not meet the specifications can be checked in this way.

Five, the checkpoint you think

Why is there no problem when the development students execute it by themselves in the same scene, but the test students can find the problem? Is it because the development students made an operation error? No, it's because the test students focus on more detailed checkpoints. In addition to intuitive results, it also includes logs during operation, data inserted/modified in the database, and other indirect processes. When you know which data needs to be focused on, you can use a complete checkpoint to confirm whether this scenario can be counted as passed.

6. If there are ready-made self-test use cases

Now many test students will provide self-test use cases for development students, which is a good start: for development students who do not have self-test awareness, it may be necessary to use self-test use cases as one of the thresholds for testing to continuously strengthen Their quality awareness; for development students who do not have test thinking, this provides an idea and direction. Self-test use cases are usually important functions and new/modified functions this time. As for how to implement, one can use data creation tools or scripts, and the other is to provide support from test students, but the ultimate hope is that developers can completely complete the Take a self-test.

Seven, continuous integration

With the promotion and implementation of continuous integration and continuous delivery, more and more projects have automatically run the acceptance test script after submitting the code, which is extremely efficient for the project. It not only shortens the time from submission to preliminary conclusion, but also reduces the risk of human error. Development students finally don’t need to worry about how to conduct self-tests, but the acceptance test script is actually completed by the development, testing, and product students. The acceptance test standards, scenarios, implementation methods, etc. are not determined and completed by any party. If there is no relatively complete automated acceptance test script, you can first use the data creation script, and then let the business side provide complete and detailed acceptance criteria, and then the technical students will write it into a script and use it.

8. Others

Another way to help developers find defects and improve code quality is pair code review. Asking you to check your own code may not find the problem because of habit, but find a colleague to review with you, and he can find and point out the points you missed and made mistakes while learning from each other.

Summarize

Therefore, development students can find more bugs by increasing the coverage of self-test scenarios, combining testing, supplementing test points from the user's perspective, and pair testing, so that self-testing can be done in place. The roles of development and testing are never opposed. Developers need to conduct self-tests to ensure the realization of the main functions, so that testers can have enough time and energy to dig out hidden defects, abnormal situations, and conduct other types of tests; testers It is necessary to provide support for developers on self-test points and test scripts to improve the efficiency of self-tests for developers. Only in this way can the team's R&D efficiency be improved and high-quality products delivered quickly.

Finally:  In order to give back to the die-hard fans, I have compiled a complete software testing video learning tutorial for you. If you need it, you can get it for free【保证100%免费】

insert image description here

Software Testing Interview Documentation

We must study to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Ali, Tencent, and Byte, and some Byte bosses have given authoritative answers. Finish this set The interview materials believe that everyone can find a satisfactory job.

insert image description here

Guess you like

Origin blog.csdn.net/wx17343624830/article/details/131611085