当前位置:网站首页>Personal thoughts on the development of game automation protocol testing tool
Personal thoughts on the development of game automation protocol testing tool
2022-07-04 10:37:00 【Pot pot pot】
Catalog
Four 、 The function interface CASE Operation process
6、 ... and 、 Use case recording
Preface
From zero to 1 Try to get a tool , The first step from the beginning , Understand packets , After the first agreement is successfully sent in the packet , Think about how to put the documents ,( Among them, the file name has been thought for a long time , Probably because experience is not enough ) How to organize test results , Up to now, the final finished product , It can be used , But I always feel like something .
When writing this article, I struggled for a long time to express clearly , Because the code cannot be made public , I originally wanted to write a use case , This may be more obvious , But finally give up ...
Generalization
be based on pytest Organize use cases , Run and aggregate reports
Use producer consumer design pattern for protocol sending and receiving
gitlab CI Realize automatic timing trigger
Using language :python3.7+
frame :pytest
One 、 scene
1、 Automatic test of functional interface
2、 Batch 、 Repeatability test data construction
Two 、 Directory structure
|_agent
|_case
--|_XX function
----|_get_xxdata.py
----|_xx_test.py
----|_conftest.py
--|_XX function
|_conftest.py
|_command-protocol
|_common
|_dist
|_docs
|_gameconfigs
|_gametools
|_pb2
|_report
|_utils
pytest.ini
run.py
setting.yaml
3、 ... and 、 catalogue
agent: Front and back interaction layer , When writing a new agreement , First write the protocol request method here
case: Use case storage directory , Create a new folder for each function , among conftest.py Perform pre-processing and post-processing before use cases , No need to import , Just pass in the firmware name in the use case function
command-protocol: proto file
common: Protocol tool file
dist: Store packaged test data tool files
example: Sample file , Some unfamiliar function usage examples
gameconfig: Game item configuration , Mainly planning and configuration
gametools: Test data construction file
docs: Project documentation related
pb2: Protobuff Converted pb file
report: Run report directory ( Do not upload to the remote , Generated locally after running )
utils: Some auxiliary scripts , For example, lead pb, Generate result code file
pytest.ini: pytest Run setup file
requirements.txt: Third party package import file
run.py: Run case entry file
Four 、 The function interface CASE Operation process


5、 ... and 、 Data structure
1、 Card drawing scene

2、 Team mate / robot
( When you are too lazy to open multiple real machine clients , Or there is no real machine on hand )

6、 ... and 、 Use case recording
A non game embedded approach , Tell me your thoughts roughly
use Wireshark Capture network packets , preservation Wireshark file , hold Wireshark The file is parsed into json file , The protocol tool then reads json file , Parse into use case steps .
Last :
The article may not be clear , If you are interested or have any suggestions, you can leave a message
边栏推荐
- Uniapp--- initial use of websocket (long link implementation)
- Huge number multiplication (C language)
- Service developers publish services based on EDAs
- PHP programming language (1) - operators
- Velodyne configuration command
- Map container
- What is devsecops? Definitions, processes, frameworks and best practices for 2022
- leetcode1-3
- [FAQ] summary of common causes and solutions of Huawei account service error 907135701
- /*The rewriter outputs the contents of the IA array. It is required that the type defined by typedef cannot be used in the outer loop*/
猜你喜欢

Summary of several job scheduling problems

Hidden C2 tunnel -- use of icmpsh of ICMP

Rhcsa day 10 operation

When I forget how to write SQL, I

From programmers to large-scale distributed architects, where are you (I)
![[Galaxy Kirin V10] [desktop] cannot add printer](/img/a6/28e4aa31e805a018e6db2b32ca1be0.jpg)
[Galaxy Kirin V10] [desktop] cannot add printer

IPv6 comprehensive experiment

【Day1】 deep-learning-basics

Use the data to tell you where is the most difficult province for the college entrance examination!

Debug:==42==ERROR: AddressSanitizer: heap-buffer-overflow on address
随机推荐
shell awk
按键精灵跑商学习-商品数量、价格提醒、判断背包
Uniapp--- initial use of websocket (long link implementation)
[Galaxy Kirin V10] [server] NFS setup
Work order management system OTRs
Ruby time format conversion strftime MS matching format
Recursive method to achieve full permutation (C language)
The bamboo shadow sweeps the steps, the dust does not move, and the moon passes through the marsh without trace -- in-depth understanding of the pointer
【FAQ】华为帐号服务报错 907135701的常见原因总结和解决方法
Safety reinforcement learning based on linear function approximation safe RL with linear function approximation translation 1
/*The rewriter outputs the contents of the IA array. It is required that the type defined by typedef cannot be used in the outer loop*/
Reasons and solutions for the 8-hour difference in mongodb data date display
Hidden C2 tunnel -- use of icmpsh of ICMP
按键精灵打怪学习-识别所在地图、跑图、进入帮派识别NPC
Student achievement management system (C language)
Collection of practical string functions
[Galaxy Kirin V10] [desktop] build NFS to realize disk sharing
Basic principle of servlet and application of common API methods
Batch distribution of SSH keys and batch execution of ansible
基于线性函数近似的安全强化学习 Safe RL with Linear Function Approximation 翻译 2


