我正在使用具有多个外部系统依赖性的系统.这些外部系统仅连接到某些SDLC环境(本地,开发,qa和prod).由于这些限制,我在我的一些量角器测试中进行了环境检查,以确定它们在执行之前所处的环境.
例如:
‘Test A’ is being run,but it is dependent on interacting with ‘external system 1’ which is only enabled for the QA environment. So if ‘Test A’ is being run in Local,Dev,or Prod then the test will fail with a message to the console using fail().
我的问题是……
有没有办法强制测试通过或跳过类似于使用fail()的消息?我试图在测试实际传递或失败的功能原因之间进行描述,以及是否由于我的报告中的环境依赖性而简单地跳过了测试.
我知道当你使用“fdescribe”或“fit”时你可以在技术上“跳过”测试,控制台会打印出类似下面的内容
Executed 1 of 25 specs (1 Failed) (24 SKIPPED) in 18 secs.