当前位置:网站首页>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.]所创,转载请带上原文链接,感谢
边栏推荐
- Flink的sink实战之一:初探
- 【总结系列】互联网服务端技术体系:高性能之数据库索引
- Mate 40系列发布 搭载华为运动健康服务带来健康数字生活
- Solve the problem of rabbitmq message loss and repeated consumption
- laravel8更新之速率限制改进
- vivoY73s和vivoY70s的区别 vivoY73s和vivoY70s哪个值得入手
- More than 50 object detection datasets from different industries
- ulab 1.0.0发布
- 软件测试培训班出来好找工作么
- Fgagt: flow guided adaptive graph tracking
猜你喜欢
Flink的sink实战之一:初探
糟糕,系统又被攻击了
ASP.NET A complete solution based on exception handling in MVC
Is blazor ready to serve the enterprise?
Insight -- the application of sanet in arbitrary style transfer
狗狗也能操作无人机!你没看错,不过这其实是架自动驾驶无人机 - 知乎
SQL Server 2008R2 18456 error resolution
sed之查找替换
Cloud alibabab notes come out, the whole network detailed explanation only this one hand is slow
Px4 adds new applications
随机推荐
Macquarie Bank drives digital transformation with datastex enterprise (DSE)
2天,利用下班后的4小时开发一个测试工具
Cloud alibabab notes come out, the whole network detailed explanation only this one hand is slow
我们采访了阿里云云数据库SQL Server的产品经理,他说了解这四个问题就可以了...
Deeplight Technology Bluetooth protocol SRRC certification services
iOS上传App Store报错:this action cannot be completed -22421 解决方案
Tiktok live monitoring Api: random recommendation
211考研失败后,熬夜了两个月拿下字节offer!【面经分享】
解决RabbitMQ消息丢失与重复消费问题
Ulab 1.0.0 release
年轻一代 winner 的程序人生,改变世界的起点藏在身边
ulab 1.0.0发布
Web novice problem of attacking and defending the world
Solve the problem of rabbitmq message loss and repeated consumption
AMD Zen3首发评测:频率超5GHz,IPC提升不止19%,这次真的Yes了 - 知乎
归纳一些比较好用的函数
2020-11-05
Python loop distinction (while loop and for loop)
Function periodic table filter value selectedvalue
【原创】关于高版本poi autoSizeColumn方法异常的情况