当前位置:网站首页>Test pits - what test points should be paid attention to when adding fields to existing interfaces (or database tables)?
Test pits - what test points should be paid attention to when adding fields to existing interfaces (or database tables)?
2022-07-07 08:48:00 【Universal car】
At the time of testing , Encountered several typical problems , All in the original interface ( Or in the database table ) When iterating on requirements , What happened . Let me summarize a little , As a lesson for subsequent testing .
Question 1 、 New fields in the database table , But the development set these fields to non empty fields , And SQL There is no default value in the statement .
Problem phenomenon : When the interface is online , The backend is online first , The front end is not online , There's a big problem , Many data cannot be written to database tables , Caused a large number of interface exceptions .
Solution : New fields , Not set to non empty , And set default values for fields in the database .
Question two 、 New fields in the database table , But I didn't notice the maximum value of this field
Problem phenomenon : A new one has been added to the database modify_user Field , Save who modified the data , But the development is in the design of database fields , The length of the field setting is too small , It simply cannot meet the needs of the longest user name .
Solution : Increase the length of fields in the database .
Question 3 、 New return field in the interface , Association queries data from other tables , But I didn't notice the maximum value of this field
Problem phenomenon : The problem is similar to the above , This is a new field in the interface , This field needs to query data from an existing table . At this time, we must pay attention to the maximum possible length of this field in the database table . During this test , It is found that the data type of this field in the interface is INT type , And in the database , The maximum possible value of this value is much greater than INT, So when the database median exceeds 2147483647 when , Interface error , Unable to return data .
Solution : Modify the data type of this field in the code .
Question 4 、 New return field in the interface , Association queries data from other tables
Problem phenomenon : This is the case , from A Query basic data in the table , But you need B Table Association queries another corresponding id And so on. . Speaking from the normal business logic ,A A piece of data , It must correspond to B A piece of data . But in production , Unfortunately, there is dirty data ,A A piece of data , stay B Table has 3 Data corresponds to , The data queried by the interface is wrong . Although it is dirty data that causes , But it also shows that the logic is not rigorous , It needs to be reprocessed .
Solution :1) How to avoid dirty data .2) Even if dirty data appears , There should also be a plan , The correct data can be queried .
边栏推荐
- How to understand distributed architecture and micro service architecture
- Gson转换实体类为json时报declares multiple JSON fields named
- Tips for using jeditabletable
- Several ways of lambda used in functions in kotlin (higher-order functions)
- [Yugong series] February 2022 U3D full stack class 008 - build a galaxy scene
- [Yu Yue education] higher vocational English reference materials of Nanjing Polytechnic University
- Required String parameter ‘XXX‘ is not present
- 联想混合云Lenovo xCloud:4大产品线+IT服务门户
- Implementation of navigation bar at the bottom of applet
- 如何在HarmonyOS应用中集成App Linking服务
猜你喜欢
IP地址的类别
A method for quickly viewing pod logs under frequent tests (grep awk xargs kuberctl)
Input and output of floating point data (C language)
Arm GIC (IV) GIC V3 register class analysis notes.
Greenplum6.x重新初始化
A single game with goods increased by 100000, and the rural anchor sold men's clothes on top of the list?
xray的简单使用
Three series of BOM elements
What is the method of manual wiring in PCB design in 22protel DXP_ Chengdu electromechanical Development Undertaking
FPGA knowledge accumulation [6]
随机推荐
Golang compilation constraint / conditional compilation (/ / +build < tags>)
Appeler l'interface du moteur de création du service multimédia de jeu Huawei renvoie le Code d'erreur 1002, le message d'erreur: les paramètres sont l'erreur
数据分析方法论与前人经验总结2【笔记干货】
23 Chengdu instrument customization undertaking_ Discussion on automatic wiring method of PCB in Protel DXP
In go language, function is a type
Frequently Asked Coding Problems
Opencv learning note 4 - expansion / corrosion / open operation / close operation
测试踩坑 - 当已有接口(或数据库表中)新增字段时,都需要注意哪些测试点?
AVL平衡二叉搜索树
Compilation and linking of programs
使用AGC重签名服务前后渠道号信息异常分析
[Chongqing Guangdong education] audio visual language reference materials of Xinyang Normal University
Arm GIC (IV) GIC V3 register class analysis notes.
Greenplum6.x搭建_安装
String operation
[Chongqing Guangdong education] organic electronics (Bilingual) reference materials of Nanjing University of Posts and Telecommunications
Iptables' state module (FTP service exercise)
【微信小程序:缓存操作】
mysql分区讲解及操作语句
【MySQL】数据库进阶之触发器内容详解