I have a big project in go and have test tasks in vscode. here is the task:
ENV=TEST go test -race -cover -timeout 60s ./..."
my problem is the test output is very general and for a bunch of files just says ok or fail.
github.com/yousefvand/secret-service/cmd/app/secretservice/cmd coverage: 0.0% of statements
github.com/yousefvand/secret-service/pkg/crypto coverage: 0.0% of statements exit status 5 FAIL
github.com/yousefvand/secret-service/cmd/app 30.084s ok github.com/yousefvand/secret-service/cmd/app/secretservice (cached) coverage: 8.6% of statements exit status 5 FAIL
github.com/yousefvand/secret-service/cmd/app/secretserviced 30.100s ok github.com/yousefvand/secret-service/internal (cached) coverage: 45.4% of statements exit status 5 FAIL
github.com/yousefvand/secret-service/pkg/client 30.104s exit status 5 FAIL
github.com/yousefvand/secret-service/pkg/service 30.075s FAIL
How can I get more detail like file name and line number of error?
I have searched for solution and it is printing error is blah on each line of code. That will cause my test functions to explode and rewriting lots of unnecessary code.
New contributor
Masoud Yousefvand is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.