Navigation 1. Preface 2. Endless development events 3. Testing drives development growth-eliminating bugs in self-testing 4. Software Testing 5. Preparing test plans 6. Compiling Test Cases 7 execute test case 8, discover and submit bug 9, the developer fixes bug 10, retests the Fixed bug 11, and closes the Fixed bug, reactivate unfixed bugs 12. flexible use of stress testing tools 13. Test and Version Control 14. Summary 15. Attachment download
1. Preface
For testing, many companies do not pay much attention to it. They have been in contact with many friends or customers and can easily find the yellow pages, 404, and UI variants (browser compatibility) by clicking on a website) the process cannot be passed, and the error message is ...... and other errors. Of course, some companies that I have worked for have basically handed over the tests to customers or website visitors. when problems are found, they often occur.
I have always been unfamiliar with this item. Although I think it is very important, I only have conceptual things and do not know how to implement them. Before the product is launched, the product is launched without any problems, rather than system testing. It wasn't until in the second half of last year that the company recruited a test engineer from a well-known Internet company, Brother Niu Qing, who gave me a valuable course, under his lust, the entire technical team has made significant progress. Of course, I have also experienced significant growth. I would like to express my sincere gratitude to Qing's brother for his selfless efforts and help, thank you.
2. Past development events
Almost every developer will firmly believe that this modification has been completed without any bugs, and then the illusion of being destroyed again and again will return to reality. This kind of silly experience often happened before, and the results can be imagined.
03. In, the developed website was directly put online without testing. After the yellow pages or errors were frequently reported, the website was immediately modified.
I went to work in a software company in Shenzhen in and once helped Dongguan customers add some new functions in the supply chain management system. After I wrote the program locally, I felt that there was no problem after self-check, then update the code and write an SQL statement to update the data. One of the deletion statements is to delete the records of a condition. You have to think about it before, but you can forget to add the conditions when writing it, then directly submit the execution in the production environment ...... I deleted all the records in the table, but at that time I didn't know how to recover the data, and the company didn't grant permissions to those websites that were hundreds of times. The whole person was blinded ...... fortunately, my boss had a database backup and helped restore it ......
In, I was developing kjava mobile app, and I had to make a small modification to the app once. After the change, I felt that it should have no effect on other places, then I submitted the materials to the Operations Department for Mass Sending. At that time, the Operation Department did not test the materials and put them directly on the website. After more than 10 minutes of data query, no fee deduction record was found, and then the software was tested again to find that the original parameter was replaced by the comment + _ + ...... fortunately, the mass data volume is not too large and there is not much loss ......
......
There are still a lot of classic past events or chores that happen to colleagues, but I cannot remember them now. The main reason for these events is that developers are not doing a good job of self-testing, and they are too self-righteous. Of course, it is also very important that the company does not pay attention to this part. It does not form a set of standards that allow developers to self-discipline, and lacks a testing department.
3. Testing drives development growth-eliminating bugs in self-testing
Let's talk about a story. In May April, two colleagues were responsible for registering, logging on to an e-commerce website, changing the password, and forgetting the password, it took four or five days to get it done (of course there are other things busy in addition to this). I always submit the test and call it back, modify the changes, submit the changes, and then call back ...... this repeat n times, the Big Brother was angry and vomited blood. The Chat records were not all sent out, and whether such a thing happened to you, me, him ...... what about everyone?
Afterwards, they concluded that they were mainly not rigorous and careless. After the completion, they always thought that the change would be complete, and they would be thrown into the test environment without self-testing. Most of these happen to inexperienced developers, and this is rare for other old cows, because old cows may grow up after being abused for thousands of times.
Of course, after this profound lesson, both of them have made great progress. They have done a lot of self-testing for the programs to be released, and similar things have rarely happened. Our other programmers, however, have also grown to varying degrees under the spur of qingge's recent six months. The quality developed by the entire team is different from the previous one.
4. Software Testing
Software testing is used to promote the process of verifying the correctness, integrity, security and quality of the software. A typical definition of software testing is the process of operating a program under specified conditions to detect program errors, to measure the software quality, and to assess whether it can meet the design requirements.
Software testing is a very important task in the software development cycle. The quality of a software after it is finally released depends on the test specialization.
The process of software development is divided by stages.
1) unit test
2) integration test
3) confirm the test
4) System Test
5) Acceptance Test
6) regression testing
7) Alpha Testing
8) beta testing
The above is the classification of professional tests, and the following content is frequently used by our developers.
The Web testing phase mainly includes the following content:
Function Testing, interface testing, compatibility testing, security testing, performance testing (including load/stress testing), pre-release testing (if strictly speaking, there will be several tests in different environments).
Of course, there is also another saying: functional testing, interface testing, reliability testing, usability testing, maintainability testing, performance testing, portability testing, security testing, etc.
The normal test process includes the following items (most of the stages are carried out according to the following process ):
1) Develop a test plan
2) Write Test Cases
3) execute test cases
4) discover and submit bugs
5) fix bugs
6) perform back-to-test on fixed bugs
7) Close the Fixed bug and reactivate the unfixed bug.
There are many documents to be written during the test, but in general, the documents to be written at each stage mainly include the test plan, test plan, test cases and test report.
5. Test Plan
As the name suggests, preparing a test plan is to arrange the testing work plan to be conducted.
As the saying goes, there are no rules and no rules. Only after a test plan is developed can specific work steps be arranged, relevant personnel should be coordinated to do the corresponding work, And the next test should be done well. A test plan should include: product Basic Information Survey, Test Requirement Description, test strategy and record, test resource configuration, schedule, problem tracking report, Test Plan Review, and result (from the Internet, for more information, see related articles ). In fact, you can simply understand that to compile a test plan, you must first view the various documents related to the project to understand the requirements, functions, and system structure, then, the work plan is arranged based on the function module and each test phase.
As a developer, we do not need to know how to write the test plan and how to implement the test plan. However, we must understand what the test work is, which is conducive to improving the development efficiency, reduce bugs. According to the test plan, we can easily arrange the following development tasks to cooperate with testers to do the corresponding development work. Of course, only by understanding the testing methods can we do a better job of self-testing.
Example of a simple test plan:
6. Test Cases
Before entering the testing stage, the tester usually opens a small meeting with the technology to discuss the testing work, in this case, the tester will forward the prepared test cases to us. A detailed test case will bring us a lot of surprises, so we can find that the original test can still play like this, and the program is operating like this to expose bugs. It seems that we suddenly opened a door in front of us, which suddenly broadened our thinking and vision.
After seeing the test cases given by the tester, I realized that the code I wrote was not taken into account for some input judgments. Only then did I know that the test was done in this way. Taking a closer look at the test cases can reduce bugs in our programs, especially the functions such as shopping cart and order writing. A slight negligence can cause vulnerabilities and attack others.
Member login test case:
7. Execute Test Cases
We are not a big company, and the tester only has a sunny brother. Therefore, we need to perform a comprehensive self-test once before submitting the test to him. During the self-test, we will follow the test cases he gave us, input and test them one by one. After each bug modification, a comprehensive test is required. People who are so patient and have a bad temper may sometimes feel upset about the test case operations that need to be performed over and over again, sometimes, if I want to steal my laziness and do my self-testing work based on test cases, I will be caught by Qing's brother. Of course, I am not the only one who is caught, but also other colleagues, haha ...... seeing that everyone has been abused, the mood is naturally good ...... I can't say that I admire Qing's brother anymore. It should be at this level of worship.
8. Discover and submit bugs
After comparing bugs submitted by professional and non-professional tests, you will know what professionalism is.
During the test, the company will ask several customer service and operation personnel to help with the test, and some bugs they submit may sometimes get confused, but they only know what went wrong, but they do not know what went wrong. There are only a few simple sentences or half a graph. After reading the graph carefully for a long time, I don't know what operations were performed on that page ...... you have to find the client to communicate with him several times before he can understand the situation. Sometimes he does not know why this happens. The picture cut there is really speechless.
Professional tests will detail the test steps, submitted content, expected content under normal circumstances, and how the bugs occur, with a few more details. At first glance, it is clear that it is easier to reproduce bugs, and it is also easy to fix.
Of course, as developers, testers complement each other and we can see from their work attitude that they are not easy to understand each other, after all, they need to repeat the same job repeatedly, and sometimes it is normal to get upset...
9. Bugs fixed by developers
I believe that everyone is always doing this job. When you want to remind you that you should never be careless about Bug modification. This is the case with many problems. After the modification is complete, you must test the test case on your own. You 'd rather spend a little more time than submitting it with confidence. If you do that, you can easily see the phenomenon mentioned in the previous story.
10. Perform back-to-test on fixed bugs
For bug fixes submitted by us, the tester will retest the bug. A responsible tester will record the bug from the ground up and recreate it based on test cases for verification. It can be seen that the temper and patience of the person who tests are really good,If you are not married, you can introduce it to the tester., Hahaha ......
11. Close the Fixed bug and reactivate the unfixed bug.
After the tester returns to the test, if no problem is found, the bug will be closed, and the bug will continue to appear, the bug will be re-activated ...... then the programmer is sad ...... continue his bug fixing path ......
12. flexible use of stress testing tools
There are not many opportunities for developers to use test tools in addition to self-testing, but some stress testing tools (suchJmeter) It is necessary to perform stress tests on your code. If you do not know the stress testing tool, the code you write may not be able to withstand the stress after going online, resulting in slow Website access and loss of customers. At the same time, it is difficult for you to analyze the bottleneck of the code and do a good job of optimization.
Here are some examples:
I have tried to perform stress tests on some customers' websites (Small and Medium e-commerce networks). After 10 concurrent operations, my website will be suspended.
I have previously participated in the development of an e-commerce network. After 300 concurrent operations, the CPU and memory are normal, but the outbound bandwidth of the server will burst soon. I found out that the website has too many images, the image must be processed separately from the website server.
I have also tried to reduce the server performance, and found that some data tables have a large number of records, resulting in a long time of database query operations, leading to a CPU upgrade.
An e-commerce network that I have done before, there is no problem with 1 K concurrency during stress testing, and then add records to some key data tables. When the number of records increases to a certain amount, some exceptions are found, after the check, it is found that when the nosql cache is used and the number of records loaded at a time is too large, the loading time is too long, leading to an exception in data loading timeout.
......
From the above example, we can see that many problems can be found in advance through some testing tools before going online, rather than Optimization after going online. Some problems may be solved through optimization methods, while some may need to modify some code or even the framework architecture, early detection of problems can help us reduce many unnecessary losses.
Of course, if you have a professional tester to help you do this, it will be much easier for developers.
13. Test and Version Control
The code we develop must be updated inevitably. In the code iteration process, the tester is a very important role.
Although most software companies use version control tools such as git, WTF, CVS, and subversion to manage source code, many software companies can find this phenomenon in reality, after the leader, Operation Department, or customer proposes a request for modification, they will be quickly updated to the server, and no professional tests will be conducted at all to control the online version work, as a result, many unpredictable problems have emerged.
In projects with the participation of testers, this phenomenon rarely occurs because professional tests have strict version control and all programs that need to be updated to the server, will be updated to the server only after strict tests by the tester and there is no problem. Each update to the server version will go through a series of tests, and the source code of these versions will also create a branch backup, which will be separately saved as a stable version, other programmers continue development in the trunk. If the update fails, they can use the previous version to replace it immediately.
14. Summary
I am not a professional test, so I will not describe the details of the test in detail. I will only talk about the common knowledge of the test from the perspective of development and learn about the basic knowledge of the test, we apologize for any errors or omissions.
Due to the limited time, we will not conduct a comprehensive test on this framework and write the corresponding test documents (the level is limited). I hope you can tell me after discovering a bug during usage, I will release the patch as soon as possible.
15. Attachment download
Some professional internal test documents cannot be shared out. Therefore, you have obtained some deleted Test Documents and templates for the test. If you are interested, you can download them.
Test document .rar
Resolution: 20140715patch .rar
When the template function getfieldvalue is modified to execute an update, the condition field is null. After the update, generate the logic layer code again.
Copyright:
This article was originally published by allempty and published in the blog Park. You are welcome to repost it. You must keep this statement without your consent and provide the original article link clearly on the article page,Otherwise, the right to pursue legal liability is reserved.. If you have any questions, you can use[Email protected]Thank you very much for contacting me.
As long as you are interested in learning and making progress together, you can add Q group: 327360708 to this topic.
For more information, please refer to blog: http://www.cnblogs.com/EmptyFS/