在Golang中将变量传递给测试用例的惯用方式

When writing test cases for golang, what is the standard way to pass in variables that need to be provided to the tests. For example, we don't want to embed passwords in the source code of the test cases.

What is the most standard way to handle this? Do we have the test cases look for a config file? Environment variable? Something else?

查看全部
dongzhuange2625
dongzhuange2625
2017/10/31 22:30
  • it技术
  • 互联网问答
  • IT行业问题
  • 编程语言问答
  • 计算机技术
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复