本文介绍了如何使用黄瓜+量角器顺序运行多个特征文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想按所需顺序或顺序运行功能文件,例如:

I want to run feature files in a desired order or sequence, for example:

 tags:"`@ProtractorScenario` or @CucumberScenario"

但是首先要执行黄瓜方案.有人可以指导我吗?

But cucumber scenario is getting executed first. Can someone guide me on this?

此外,如果特征文件超过50个,定义黄瓜特征文件排序的最佳方法是什么?

Also, in cases with more than 50+ feature files, what would be the best way to define sequencing of cucumber feature files?

推荐答案

为了拥有可靠的测试,您的测试应该独立并且不依赖于它们的运行顺序.原因是您的测试不应依赖在系统处于特定状态时,这将导致测试不稳定.您的每个测试都应设置预期状态(并拆除!),以便它们可以独立运行.

In order to have reliable tests, your tests should be independent and not rely on the order they are run in. The reason being that your test shouldn't depend on the system being in a certain state, as this will lead to flaky tests. Each of your tests should set up the expected state (and teardown!), so they can be run independently.

这篇关于如何使用黄瓜+量角器顺序运行多个特征文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 18:25