套房VS规格量角器 [英] Suites vs Specs Protractor
问题描述
我最近拿起用量角器一个项目。
我有麻烦了解一套房和规格的之间的的区别。我也有这个文件夹是追着我跑测试的另一个文件夹,它失败的所有测试,当我运行测试的一个文件夹具有套房的麻烦。下面将是巨大的上市任何帮助是或套房的样子。
例如:
套房:{
CSRSmokeTest:../smoke/Video/**.js
DesktopSmokeTest:../smoke/deskTop/**.js
},
套房是组织你的测试非常有用的。
问题实际上是下降到一个套件和测试用例一般之间的差异。从维基百科测试套件的定义报价:
的那些旨在测试用例的集合被用来测试一个
软件程序,表明它具有一些特定的行为集。
测试套件通常包含每一个详细的说明或目标
测试用例收集和信息系统配置
在测试过程中被使用。
块引用>在换句话说,一个测试套件是由的共同财产统一规格/测试用例的集合,逻辑的。例如,你可能有不同类型的应用程序的功能套件,
首页
,搜索
等套房:{
主页:测试/ E2E /主页/ ** / * Spec.js',
搜索:
测试/ E2E / contact_search / ** / * Spec.js',
测试/ E2E / venue_search / ** / * Spec.js
]
},和/或,你可能有通过测试的类型分为套房规格:
套房:{
烟:'测试/ E2E /烟/ * JS',
性能:'测试/端到端/性能/ * JS
},或者,你可以把所有的回归测试到一个单独的套件。或者,你可以使用自己的逻辑组规格。
要注意,单一规格可以是多个测试套件的一部分,这一点很重要的
I have recently picked up a project using Protractor.
I am having troubles understand the difference between a suite and a specs. I am also having trouble with a suites when I am running a folder of test's after that folder is ran I run another folder of test and it fails all the test. Any help would be great listed below is what or suite looks like.
Example:
suites: { CSRSmokeTest: '../smoke/Video/**.js' DesktopSmokeTest: '../smoke/deskTop/**.js' },
解决方案Suites are incredibly useful for organizing your tests.
The question actually goes down to differences between a suite and a test case in general. Quote from the wikipedia "Test suite" definition:
a collection of test cases that are intended to be used to test a software program to show that it has some specified set of behaviours. A test suite often contains detailed instructions or goals for each collection of test cases and information on the system configuration to be used during testing.
In other words, a test suite is a collection of specs/testcases united by a common property, logic. For instance, you may have suites for different types of functionality of your application,
homepage
,search
etc:suites: { homepage: 'tests/e2e/homepage/**/*Spec.js', search: [ 'tests/e2e/contact_search/**/*Spec.js', 'tests/e2e/venue_search/**/*Spec.js' ] },
And/or, you may have specs grouped into suites by the type of tests:
suites: { smoke: 'tests/e2e/smoke/*.js', performance: 'tests/e2e/performance/*.js' },
Or, you may put all of your "regression" tests into a separate suite. Or, you can apply your own logic to group specs.
It is important to note that a single spec can be a part of multiple test suites.
这篇关于套房VS规格量角器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!