当前位置:网站首页>Programmer growth Chapter 8: do a good job of testing
Programmer growth Chapter 8: do a good job of testing
2022-07-05 13:33:00 【51CTO】
In most companies , After the programmer finishes the function , There will be special test department students to conduct professional tests . In fact, many large companies didn't have testing posts in the early days , It's as more and more skills are tested , The requirement for ability is higher and higher , Only then did I have a testing position .
But I think even if the company has test engineers , As R & D personnel , You should also be able to test . Know some test thinking . Think about it , If in the team , Every time you submit code , Feedback bug most . Is it also shameless ?
I think the following points , Every R & D personnel should think and practice .
One 、 Thinking in abnormal situations . Under the inertial thinking , When testing a function, we will input it according to the normal value . For example, withdrawal function . We will test a positive number . The abnormal situation is , Let's enter a 0 Or a negative number or non number , How will the software feed back ? Whether the front end is controlled ? Is there any control at the back end . It is only right to control both .
Two 、 Thinking about extreme abnormal situations , For example, the weak network environment , Will cause the request to fail , Whether reconnection is required ? What is the mechanism of reconnection ? Another example is that the input item is an array , Normally, we will pass in an array , Non array condition , We do a good job of handling , Also consider extreme situations , For example, pass in a very large array , The program will jam and collapse , Or how ? This needs to be considered when writing code .
3、 ... and 、 Do unit test well . Unit testing is used for a module 、 A function or a class to test correctness . Generally, we will run unit tests through program Automation . If something goes wrong , We usually run unit tests first , After this passes , To find the cause of the problem .
Four 、 Do function test well . After running the unit test , Then do the function test . Because even if each independent module is normal , But there are still many situations that will cause problems . Every time you modify, you need to run through the functions you have done . In general, we are testing in real / In the test environment , The situation of simulated data test is not .
5、 ... and 、 Have your own problem base , Put all the things you have met bug And solutions are put into the problem library . It would be better if the company has a problem base , without , You can also advise your supervisor to set up . With this problem base , Later, the same type of problems , Can quickly find solutions , Avoid the same problem , We need to solve it from the beginning every time .
In fact, testing is sometimes more difficult than writing code , Because when you write, you think and code according to normal logic , But after the test, you need to think from different scenes , This critical thinking 、 Logical thinking 、 The ability to think systematically , But it's worth investing in exercise .
边栏推荐
- MMSeg——Mutli-view时序数据检查与可视化
- 【Hot100】33. 搜索旋转排序数组
- RHCSA8
- A detailed explanation of ASCII code, Unicode and UTF-8
- js判断数组中是否存在某个元素(四种方法)
- 峰会回顾|保旺达-合规和安全双驱动的数据安全整体防护体系
- 面试官灵魂拷问:为什么代码规范要求 SQL 语句不要过多的 join?
- APICloud Studio3 API管理与调试使用教程
- leetcode 10. Regular expression matching regular expression matching (difficult)
- Datapipeline was selected into the 2022 digital intelligence atlas and database development report of China Academy of communications and communications
猜你喜欢
Idea设置方法注释和类注释
私有地址有那些
Shandong University Summer Training - 20220620
Asemi rectifier bridge hd06 parameters, hd06 pictures, hd06 applications
Don't know these four caching modes, dare you say you understand caching?
精彩速递|腾讯云数据库6月刊
Binder通信过程及ServiceManager创建过程
Operational research 68 | the latest impact factors in 2022 were officially released. Changes in journals in the field of rapid care
Nantong online communication group
Binder communication process and servicemanager creation process
随机推荐
Godson 2nd generation burn PMON and reload system
Write macro with word
My colleague didn't understand selenium for half a month, so I figured it out for him in half an hour! Easily showed a wave of operations of climbing Taobao [easy to understand]
峰会回顾|保旺达-合规和安全双驱动的数据安全整体防护体系
私有地址有那些
How to realize batch sending when fishing
Record in-depth learning - some bug handling
C# 对象存储
stm32逆向入门
Apicloud studio3 API management and debugging tutorial
Win10 - lightweight gadget
DataPipeline双料入选中国信通院2022数智化图谱、数据库发展报告
Jenkins installation
同事半个月都没搞懂selenium,我半个小时就给他整明白!顺手秀了一波爬淘宝的操作[通俗易懂]
Idea设置方法注释和类注释
[deep learning paper notes] hnf-netv2 for segmentation of brain tumors using multimodal MR imaging
leetcode 10. Regular Expression Matching 正则表达式匹配 (困难)
The "Baidu Cup" CTF competition was held in February 2017, Web: explosion-2
go 数组与切片
Usage, installation and use of TortoiseSVN