当前位置:网站首页>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 .
边栏推荐
- Gson转换实体类为json时报declares multiple JSON fields named
- Iptables' state module (FTP service exercise)
- 数据库存储---表分区
- A method for quickly viewing pod logs under frequent tests (grep awk xargs kuberctl)
- [Yugong series] February 2022 U3D full stack class 008 - build a galaxy scene
- Leetcode 1984. Minimum difference in student scores
- Novice entry SCM must understand those things
- AVL平衡二叉搜索树
- [kuangbin]专题十五 数位DP
- MySQL introduction - crud Foundation (establishment of the prototype of the idea of adding, deleting, changing and searching)
猜你喜欢

Data type - floating point (C language)
![FPGA knowledge accumulation [6]](/img/db/c3721c3e842ddf4c1088a3f54e9f2a.jpg)
FPGA knowledge accumulation [6]

A bug using module project in idea

21 general principles of wiring in circuit board design_ Provided by Chengdu circuit board design

NCS Chengdu Xindian interview experience

oracle一次性说清楚,多种分隔符的一个字段拆分多行,再多行多列多种分隔符拆多行,最终处理超亿亿。。亿级别数据量

联想混合云Lenovo xCloud:4大产品线+IT服务门户

Virtual address space

Laravel8 uses passport login and JWT (generate token)

详解华为应用市场2022年逐步减少32位包体上架应用和策略
随机推荐
Three usage scenarios of annotation @configurationproperties
Database storage - table partition
go写一个在一定时间内运行的程序
leetcode135. Distribute candy
Required String parameter ‘XXX‘ is not present
Why choose cloud native database
[Yugong series] February 2022 U3D full stack class 008 - build a galaxy scene
快速集成认证服务-HarmonyOS平台
IP地址的类别
[Chongqing Guangdong education] accounting reference materials of Nanjing University of Information Engineering
[wechat applet: cache operation]
Frequently Asked Coding Problems
2-3查找樹
指针进阶,字符串函数
Greenplum6.x搭建_安装
Golang compilation constraint / conditional compilation (/ / +build < tags>)
let const
Novice entry SCM must understand those things
National SMS center number inquiry
Implementation of navigation bar at the bottom of applet