最重要的测试案例
问题描述:
I am a beginner for Mattermost.I have setup complete mattermost and it runs appropriately.Kindly let me know how can I run and test the test case files like 'post_test.go'.
我是Mattermost的初学者。我已经完成了最重要的设置,并且运行正常。请告诉我如何 运行并测试诸如“ post_test.go”之类的测试用例文件。 p> div>
答
for running mattermost test you should run make test
cause there are a few thing that need to be run first. sadly you can't run separate tests files
答
You can change directory where the test file is located and then do something like:
go test -test.run="^TestCreatePost$"
答
You could run an individual the test case like so
go test -v -run={NameOfTestFunc} ./{relative_folder_where_test_is}
Example:
go test -v -run=TestGetUsersInChannel ./api4