Do you need to learn programming to do software testing?

Jobs once said that "everyone should learn programming, because it will teach you how to think." Look, Joe's boss thinks that everyone should learn programming, so do you want to learn to do testing? of course yes.

As a tester, in addition to the above reasons, I think if you can program, there are the following three benefits.

1. Knowing the technical implementation, you can design more targeted use cases

For example, in the test of calculators I mentioned in "Requirements Review: Practical Exercises", some people will write a use case as "testing a very large number".
But what is a big number? Does 100000 count? Many people can't answer.
In other words, many people know the situation that needs to test the boundary value, but no one knows what the boundary value is.
Of course not everyone knows.
For example, some people say that it is the maximum value of the int type. Yes, it is very reliable to be able to say this. Just imagine, if you don't know how to program, can you know what the int type is? Can you know to use the maximum value of int for targeted testing?

2. It is easier to communicate with the development at the logic level, and it is better to expand the testing ideas

For example, a classmate found a bug:
if a program.exe file is dropped in the root directory of the Windows system disk, some programs will go wrong when executing process creation, and program.exe will be executed.
So this classmate went to find the developer to communicate.

The communication process of the first classmate is like this:
Test: xgg, what caused this problem?
Development: The target process path has spaces, and there are no quotes in my code, so something goes wrong.
Test: Oh, great.

Another classmate felt that he still had doubts, so he found the developer again.
Test: xgg, which implementation is the problem? Is our internal function implementation? Or is there a problem with the system API called?
Development: I use the CreateProcess API, if the second parameter contains spaces and no quotation marks, this problem will occur.
Test: CreateProcess API is used in many places, can you search to see if each place has been modified this time?
Dev: Alright, watch it now.
Test: CreateProcessAsUser, CreateProcessWithLogon, CreateProcessWithToken with the same function should have similar problems, you can search them together to see if they have been resolved.
Development: OK, watch now.

If you are a developer, which tester do you like to work with?
If you are taking a test, do you want the classmate in front of you or the one behind you?

3. Better automatic thinking, implement efficiency improvement

Now many functions will add some logs in the logic. If it is a debug version file, the log output will be more. For client products, many log outputs are in dbgview. We can filter through some filter conditions, and even set Highlight, but if it is a purely local text log output, you must press Ctrl+F and enter keywords to confirm one by one every time you view the log.

Let's take a look at the steps of manual operation:
Step 1: Find the log file and open it;
Step 2: Ctrl+F to bring up the search box and enter keywords;
Step 3: Enter-check-enter-check, and so on ;

At this time, if there is a classmate who knows some simple scripting techniques, he may consider optimizing this process, such as providing a tool. You only need to enter keywords in the tool, and the tool will automatically find the log file and save all the keys. Wouldn’t it be much fun to extract all the records related to words?

Let's take a look at the operation steps of using this tool:
Step 1: Open the tool and enter a keyword (the tool finds the log path by itself, and ensures that the latest log is obtained every time it operates); Step 2: Check the result
( The results are all related content);

It seems that it only saves one step, but in the two steps of the tool, there is a lot of optimization of repeated operations implied.

For example, the first step is "open the tool and enter keywords". In fact, the tool searches for the log path by itself, and guarantees to obtain the latest log every time it is operated. This avoids the trouble of reopening the log every time during manual operation. .
For example, in the second step of "checking the results", before checking the search results one by one in all the logs, the results of the tool now only display contextual information related to keywords, which can greatly reduce the interference of other information, making it faster and more accurate to find the information you need.

If you don't know how to program, would you consider using this simple tool to improve efficiency?
Even if you consider that you can use tools to improve efficiency, can you quickly and accurately put forward your needs and find someone to help realize them?
Even if it is realized, can you always find someone to help you optimize when you encounter some small experience problems?

Finally:
Do I need to learn programming for testing? My answer is, yes, the test that can program can work hard towards the test development direction of the business line.
Can I do the test if I don't know how to program? My answer is, yes, tests that don't know how to program can continue to be cultivated in the direction of business experts.

Want to learn but can't start, how to learn?

Here I have prepared learning materials corresponding to each of the above knowledge points, self-study artifacts, and project practice.

If my blog is helpful to you, if you like the content of my article, please "Like", "Comment", "Favorite" with one click!

Guess you like

Origin blog.csdn.net/test_zhuoran/article/details/131669573