当前位置:网站首页>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 .
边栏推荐
- 通讯录(链表实现)
- MATLAB论文图表标准格式输出(干货)
- MySQL get time
- leetcode 10. Regular Expression Matching 正则表达式匹配 (困难)
- Could not set property ‘id‘ of ‘class XX‘ with value ‘XX‘ argument type mismatch 解决办法
- Redis6 master-slave replication and clustering
- 从外卖点单浅谈伪需求
- Talking about fake demand from takeout order
- 南理工在线交流群
- 【 script secret pour l'utilisation de MySQL 】 un jeu en ligne sur l'heure et le type de date de MySQL et les fonctions d'exploitation connexes (3)
猜你喜欢
![[notes of in-depth study paper]transbtsv2: wider instead of deep transformer for medical image segmentation](/img/70/6de0346df8527af6c88db1ff89947b.png)
[notes of in-depth study paper]transbtsv2: wider instead of deep transformer for medical image segmentation

What is a network port

Catch all asynchronous artifact completable future

Jenkins installation

Can and can FD

Binder通信过程及ServiceManager创建过程

MySQL --- 数据库查询 - 排序查询、分页查询

Laravel框架运行报错:No application encryption key has been specified

Fragmented knowledge management tool memos

Record in-depth learning - some bug handling
随机推荐
MMSeg——Mutli-view时序数据检查与可视化
【MySQL 使用秘籍】一网打尽 MySQL 时间和日期类型与相关操作函数(三)
Parsing XML using Dom4j
【Hot100】33. Search rotation sort array
华为推送服务内容,阅读笔记
时钟周期
Laravel框架运行报错:No application encryption key has been specified
jenkins安装
Personal component - message prompt
Go string operation
Apicloud studio3 API management and debugging tutorial
Integer ==比较会自动拆箱 该变量不能赋值为空
mysql获得时间
“百度杯”CTF比赛 九月场,Web:SQL
go 指针
leetcode 10. Regular Expression Matching 正则表达式匹配 (困难)
C# 对象存储
stm32逆向入门
Difference between avc1 and H264
APICloud Studio3 API管理与调试使用教程