When the engineer found that his brain could not ensure that the program he wrote worked correctly, he decided to solve this problem by writing tests. As a novice using the Go language, after touching the convenient and simple functions of the go test, I decided to write a tool that is more suitable for the Functional Verification Test.
The speakers of this agenda will start from the use of thinking in the go test, sort out the nature and needs of Unit Test and Functional Verification Test encountered in the development, and share the experience of designing and implementing test frameworks.
The outline of the agenda is as follows:
- go test design thinking
- Write test case
- Collect test data
- The nature and needs of the Unit Test and Functional Verification Test encountered during development
- Unit Test
- The correctness of individual functions or packages
- Usually tested during development
- Problems must be detected at CI at the latest
- Functional Verification Test
- Think from the perspective of how users use, not how developers develop
- The presentation of a function may require multiple Packages or even multiple Microservices
- Expected to be executed at the end of CI or CD Pipeline
- Demand
- You cannot stop the test because a single case fails
- Can continuously collect important information of each checkpoint and sort out the report at the end
- I hope to use Go’s concurrent features to speed up the test work
- Reduce the cost of testing as much as possible to avoid the trouble of setting up the environment
- Further, allow the vast majority of team members to have a way to test themselves
- Unit Test
- Design and implementation
- Pass in Instance from test case function parameters to continuously collect data and sort out the report at the end
- Each Test Case should not have dependencies, and concurrent execution after splitting improves efficiency
- Designed as a REST API Server that can be easily triggered to execute through endpoints
- To prevent malicious testing from being triggered externally, add a layer of jwt verification mechanism
About Rain Wu
Hi, my name is Rain. I am currently studying in the Computer Science Department of National Cheng Kong University, and also a member of the CCNS club. I have about one and a half years of internship experience in the past, mainly using Python and Go for Backend and Data engineering development.
I usually love to study business model and game theory, render something with Blender, and also participate in the preparation of many technical conferences. Welcome to contact with me via the following links!
LinkedIn : https://www.linkedin.com/in/rain0114/
GitHub : https://github.com/RainrainWu