I have a suite of scenarios that should be runned against a site. Now I want to make a configuration testing using this test suite against large amount of urls. The tests that should be runned are equal, the only difference is base url of site.
我有一套应该针对网站运行的方案。现在我想针对大量网址使用此测试套件进行配置测试。应该运行的测试是相同的,唯一的区别是站点的基本URL。
Currently I have the following ideas on how it can be done:
目前我对如何做到有以下想法:
- Convert scenarios to scenario outlines.
Disadvantage: I should provide examples in each of scenario outlines. One "Examples" will be list of base urls of sites. All lists will be equal and copy-pasted for each of scenario outlines. - Gem cuke_iterations.
Disadvantage: I need to specify tags in each of my scenarios -
Iterating over urls in Rakefile.
Disadvantage: If I'll do it like在Rakefile中迭代url。缺点:如果我愿意的话
# Iterating over urls # Running Cucumber::Rake::Task end
then new copies of Cucumber and driver will be created for each of urls. It will take too much time
然后将为每个网址创建Cucumber和驱动程序的新副本。这将花费太多时间
-
Use hooks. But I don't know how it can be done via them
使用钩子。但我不知道如何通过它们来完成
将场景转换为场景轮廓。缺点:我应该在每个场景大纲中提供示例。一个“示例”将是站点的基本URL列表。对于每个场景轮廓,所有列表都是相同的并且是复制粘贴的。
宝石cuke_iterations。缺点:我需要在每个场景中指定标签
What's the best method to solve it?
什么是解决它的最佳方法?
1 个解决方案
#1
3
As the author of the cuke_iterations gem, I'll jump in to say your situation is exactly what it's designed for. It hadn't crossed my mind that you may not want to specify tags for each scenario, I will look into removing that requirement.
作为cuke_iterations gem的作者,我会跳进去说你的情况正是它的设计目标。我没想到您可能不想为每个场景指定标签,我将考虑删除该要求。
Don't forget that you can specify tags at the feature level, which will then apply to any scenario contained within that feature, so depending on how many scenarios per feature you have, it may not be a huge disadvantage.
不要忘记您可以在功能级别指定标记,然后将其应用于该功能中包含的任何方案,因此根据您拥有的每个功能的场景数量,它可能不是一个巨大的劣势。
#1
3
As the author of the cuke_iterations gem, I'll jump in to say your situation is exactly what it's designed for. It hadn't crossed my mind that you may not want to specify tags for each scenario, I will look into removing that requirement.
作为cuke_iterations gem的作者,我会跳进去说你的情况正是它的设计目标。我没想到您可能不想为每个场景指定标签,我将考虑删除该要求。
Don't forget that you can specify tags at the feature level, which will then apply to any scenario contained within that feature, so depending on how many scenarios per feature you have, it may not be a huge disadvantage.
不要忘记您可以在功能级别指定标记,然后将其应用于该功能中包含的任何方案,因此根据您拥有的每个功能的场景数量,它可能不是一个巨大的劣势。