当前位置:网站首页>2 days, using 4 hours after work to develop a test tool
2 days, using 4 hours after work to develop a test tool
2020-11-08 09:45:00 【I'm sorry.】
Source code and installation package :
git route :https://github.com/yzxwp/test_Autotool.git
Installation package download : link :https://pan.baidu.com/s/1w6AeBx2I1d9FZDxR6rcuMw Extraction code :GGMM
Development reasons :
Now I'm mainly engaged in the testing of auto finance projects , Colleagues around me told me , The test data is hard to build , For example, the ID number , Unified social credit code , Vehicle frame number and other data verification is complex , Direct access to data in the database involves information that can be , After desensitization, the data may not be available , Online generation tools are not available due to network permissions , There are colleagues who have access to the Internet , But these websites sometimes don't know why they will be closed for a period of time , So it can take a long time to make a piece of data , In order to improve the test efficiency and quality , Avoid wasting valuable testing time on manufacturing data , So I combine the number generation rules on the Internet , For the existing method implementation directly cv Dafa , If not, I wrote it myself , Write this small program to automatically generate test data .
Usage method :
take exe Download the file ,git And Baidu cloud can , Put them on the desktop or in the right path .
Then double click to open .


Click on the right to retrieve the data , You can get new data in the text box , Click the bottom to retrieve all the data , You can refresh all the data .
I used to do back-end development , I don't know much about front-end technology , After watching it all afternoon tkinter, I write about disability GUI page , I hope you can criticize and correct .
class demo():
def __init__(self):
self.root = Tk()
self.root.title(" Auto generate test data widget ") # Set the window title
# self.root.attributes("-toolwindow", 1)
dd.center_window(self.root, 340, 280)
self.way()
def way(self):
# refresh all
Button(self.root, text=' Recapture all the data :', command=self.text_all).grid(row=8, column=2, sticky=W)
# User name
self.lab_name = Label(self.root, text=' use Household surname name :').grid(row=0, column=1)
self.text_name = Text(self.root, height=1, width=20)
self.text_name.insert('0.0', name.random_name())
self.text_name.grid(row=0, column=2, sticky=W)
self.text_name_click = Button(self.root, text=' Recapture :',command=self.text_name1).grid(row=0, column=3, sticky=W)
# Phone number
self.lab_phone = Label(self.root, text=' hand machine Number code :').grid(row=1, column=1)
self.text_phone = Text(self.root, height=1, width=20)
self.text_phone.insert('0.0', phone.phone_num())
self.text_phone.grid(row=1, column=2, sticky=W)
self.text_phone_click = Button(self.root, text=' Recapture :',command=self.text_phone1).grid(row=1, column=3, sticky=W)
# Id card number
self.lab_idcard = Label(self.root, text=' body Share Prove Number code :').grid(row=2, column=1)
self.text_idcard = Text(self.root, height=1, width=20)
self.text_idcard.insert('0.0', id_card.main())
self.text_idcard.grid(row=2, column=2, sticky=W)
self.text_idcard_click = Button(self.root, text=' Recapture :',command=self.text_idcard1).grid(row=2, column=3, sticky=W)
# Unified social credit code
self.lab_tyshzxm = Label(self.root, text=' Unified social credit code :').grid(row=3, column=1)
self.text_tyshzxm = Text(self.root, height=1, width=20)
self.text_tyshzxm.insert('0.0', id_credit.create_social_credit())
self.text_tyshzxm.grid(row=3, column=2, sticky=W)
self.text_tyshzxm_click = Button(self.root, text=' Recapture :',command=self.text_tyshzxm1).grid(row=3, column=3, sticky=W)
# Organization code
self.lab_zzjgdm = Label(self.root, text=' organization Institutions Code :').grid(row=4, column=1)
self.text_zzjgdm = Text(self.root, height=1, width=20)
self.text_zzjgdm.insert('0.0', id_credit.create_organization())
self.text_zzjgdm.grid(row=4, column=2, sticky=W)
self.text_zzjgdm_click = Button(self.root, text=' Recapture :',command=self.text_zzjgdm1).grid(row=4, column=3, sticky=W)
# Get the frame number at random
self.lab_vin = Label(self.root, text=' vehicle Frame Number :').grid(row=5, column=1)
self.text_vin = Text(self.root, height=1, width=20)
self.text_vin.insert('0.0', vin.random_vin())
self.text_vin.grid(row=5, column=2, sticky=W)
self.text_vin_click = Button(self.root, text=' Recapture :',command=self.text_vin1).grid(row=5, column=3, sticky=W)
# Get the bank card of ICBC at random
self.lab_bank_gon = Label(self.root, text=' ICBC Bank card number :').grid(row=6, column=1)
self.text_bank_gon = Text(self.root, height=1, width=20)
self.text_bank_gon.insert('0.0', bank_card.gen_bank_card_nonghang())
self.text_bank_gon.grid(row=6, column=2, sticky=W)
self.text_bank_gon_click = Button(self.root, text=' Recapture :',command=self.text_bank_gon1).grid(row=6, column=3, sticky=W)
# Get ABC bank card at random
self.lab_bank_non = Label(self.root, text=' ABC Bank card number :').grid(row=7, column=1)
self.text_bank_non = Text(self.root, height=1, width=20)
self.text_bank_non.insert('0.0', bank_card.gen_bank_card_gonghang())
self.text_bank_non.grid(row=7, column=2, sticky=W)
self.text_bank_non_click = Button(self.root, text=' Recapture :',command=self.text_bank_non1).grid(row=7, column=3, sticky=W)
self.root.mainloop()
def text_name1(self):
self.text_name.delete('0.0', END)
self.text_name.insert('0.0', name.random_name())
def text_phone1(self):
self.text_phone.delete('0.0', END)
self.text_phone.insert('0.0', phone.phone_num())
def text_idcard1(self):
self.text_idcard.delete('0.0', END)
self.text_idcard.insert('0.0',id_card.main())
def text_tyshzxm1(self):
self.text_tyshzxm.delete('0.0', END)
self.text_tyshzxm.insert('0.0', id_credit.create_social_credit())
def text_zzjgdm1(self):
self.text_zzjgdm.delete('0.0', END)
self.text_zzjgdm.insert('0.0', id_credit.create_organization())
def text_vin1(self):
self.text_vin.delete('0.0', END)
self.text_vin.insert('0.0', vin.random_vin())
def text_bank_gon1(self):
self.text_bank_gon.delete('0.0', END)
self.text_bank_gon.insert('0.0', bank_card.gen_bank_card_gonghang())
def text_bank_non1(self):
self.text_bank_non.delete('0.0', END)
self.text_bank_non.insert('0.0', bank_card.gen_bank_card_nonghang())
def text_all(self):
self.text_name.delete('0.0', END)
self.text_name.insert('0.0', name.random_name())
self.text_phone.delete('0.0', END)
self.text_phone.insert('0.0', phone.phone_num())
self.text_idcard.delete('0.0', END)
self.text_idcard.insert('0.0', id_card.main())
self.text_tyshzxm.delete('0.0', END)
self.text_tyshzxm.insert('0.0', id_credit.create_social_credit())
self.text_zzjgdm.delete('0.0', END)
self.text_zzjgdm.insert('0.0', id_credit.create_organization())
self.text_vin.delete('0.0', END)
self.text_vin.insert('0.0', vin.random_vin())
self.text_bank_gon.delete('0.0', END)
self.text_bank_gon.insert('0.0', bank_card.gen_bank_card_gonghang())
self.text_bank_non.delete('0.0', END)
self.text_bank_non.insert('0.0', bank_card.gen_bank_card_nonghang())
This gadget is already in use , It has been highly praised by colleagues , It greatly saves the time of colleagues . Follow up optimization is ready , Recently, I collected suggestions from my colleagues , Add some data , for example : Middle signature code , The card numbers of the other three of the five banks .
I will develop one later monkey Gadgets , Can automatically generate monkey command , Get the phone automatically devices Etc ,
版权声明
本文为[I'm sorry.]所创,转载请带上原文链接,感谢
边栏推荐
- 2020-11-05
- 解决Safari浏览器下载文件文件名称乱码的问题
- Improvement of rate limit for laravel8 update
- 学习小结(关于深度学习、视觉和学习体会)
- Macquarie Bank drives digital transformation with datastex enterprise (DSE)
- 比Python快20%,就问你兴不兴奋?
- 【原创】关于高版本poi autoSizeColumn方法异常的情况
- 游戏优化性能杂谈(十一) - 知乎
- Solve Safari browser download file name garbled problem
- Shiyou's numerical analysis assignment
猜你喜欢

Function periodic table filter value selectedvalue

FORTRAN 77 reads some data from the file and uses the heron iteration formula to solve the problem

laravel8更新之速率限制改进

python学习 day1——基础学习

Sum up some useful functions

vivoY73s和vivoY70s的区别 vivoY73s和vivoY70s哪个值得入手

攻防世界之web新手题

Littlest JupyterHub| 02 使用nbgitpuller分发共享文件

python 循环区分(while循环和for循环)

It's 20% faster than python. Are you excited?
随机推荐
Mate 40 series launch with Huawei sports health service to bring healthy digital life
Can you do it with only six characters?
Shiyou's numerical analysis assignment
数据科学面试应关注的6个要点
ts流中的pcr与pts计算与逆运算
Flink's sink: a preliminary study
Adobe Prelude / PL 2020 software installation package (with installation tutorial)
软件测试培训班出来好找工作么
OSChina 周日乱弹 —— 之前呢,我一直以为自己是个……
Px4 adds new applications
How did Julia become popular?
IOS learning note 2 [problems and solutions encountered during the installation and use of cocopods] [update 20160725]
阅读心得:FGAGT: Flow-Guided Adaptive Graph Tracking
Cloud alibabab notes come out, the whole network detailed explanation only this one hand is slow
How can a technician take over a complex system?
Insight -- the application of sanet in arbitrary style transfer
蓝牙2.4G产品日本MIC认证的测试要求
临近双11,恶补了两个月成功拿下大厂offer,跳槽到阿里巴巴
C++在C的基础上改进了哪些细节
我们采访了阿里云云数据库SQL Server的产品经理,他说了解这四个问题就可以了...