Home  >  Article  >  Backend Development  >  How to change the default message structure used by GoLand when generating automated tests

How to change the default message structure used by GoLand when generating automated tests

PHPz
PHPzforward
2024-02-08 23:21:29943browse

如何更改 GoLand 在生成自动化测试时使用的默认消息结构

php Xiaobian Yuzai teaches you how to change the default message structure used by GoLand when generating automated tests. When conducting automated testing, the message structure used by GoLand by default may not meet your needs, and manually changing the message structure of each test case is too cumbersome. Fortunately, GoLand provides an easy way to modify the default message structure, making your test cases more flexible and efficient. Next, let’s take a look at how to set it up!

Question content

I really like GoLand’s test generation feature.

I only want to make a very small adjustment to the error messages displayed using the gotest framework.

I really just want to change that string in the t.Errorf() line, how do I do this in the configuration?

I really want to add parameters in the brackets of the function, I also want to put what I want in a new line

Solution

EditFunction Test Templates are currently not available in GoLand.

Please check and follow GO-10290.

The above is the detailed content of How to change the default message structure used by GoLand when generating automated tests. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:stackoverflow.com. If there is any infringement, please contact admin@php.cn delete