首页 \ 问答 \ 黄瓜组合测试(Combinatorial testing with Cucumber)

黄瓜组合测试(Combinatorial testing with Cucumber)

我有一个场景大纲有两个不同的变量。 一个变量有大约20个不同的值,另一个有3个。

我需要能够测试每一个单独的组合,并且我需要在一个单独的场景中分别进行测试,因为它们必须独立进行测试。

目前,我只是用手写出来的(它们是示例中的整数,但不是在我的测试中):

Scenario Outline: Test my stuff
Given first var is <var_a>
And second var is <var_b>
When I do stuff
Then good stuff should happen

Examples:
| var_a | var_b |
| 1     | 1     |
| 1     | 2     |
| 1     | 3     |
| 2     | 1     |
| 2     | 2     |
etc...

问题:有没有办法在每个组合都不需要写出来的情况下运行? 后面的变量必然会随着大小和内容的变化而变化,我宁愿有一个单一的数据结构来处理。


I have a scenario outline that has two different variables. One variable has about 20 different values and the other has 3.

I need to be able to test every single combination and I need each in a separate scenario since they must be tested independently.

Currently, I just write it out by hand(they are integers in the example but not in my test):

Scenario Outline: Test my stuff
Given first var is <var_a>
And second var is <var_b>
When I do stuff
Then good stuff should happen

Examples:
| var_a | var_b |
| 1     | 1     |
| 1     | 2     |
| 1     | 3     |
| 2     | 1     |
| 2     | 2     |
etc...

Question: Is there a way to run this where every combination doesn't have to be written out? The variables are bound to change in size and content later on and I would prefer to have a single data structure to deal with.


原文:https://stackoverflow.com/questions/5872812
更新时间:2023-07-03 13:07

相关问答

更多
  • 事实证明,解决方案很简单,它有两个部分。 首先,一个控制器方法(ProjectController @ index,在这种情况下)必须返回一些东西。 其次,当我在开发人员控制台中检查“网络”选项卡时发现错误 - 500错误在完整响应中返回了更多信息。 显然,要在Laravel 5中使用“Response :: json(...)”,您必须将其包含在内 use Response; 或命名空类并写入\Response::json(...) 。 我通过use语句包含它,并按预期返回API调用。 It turns ...
  • 我认为你对AWS服务代理和HTTP服务代理感到困惑。 API网关可以将API调用转发到不同类型的后端: - 一个lambda函数 - AWS服务(例如,请参阅http://docs.aws.amazon.com/apigateway/latest/developerguide/integrating-api-with-aws-services-s3.html ) - 一个现有的API,运行在AWS或在场所(您的用例) 定义您的API时,请务必定义POST谓词并将端点URL指向您的EC2实例URL 我只是在h ...
  • 我相信你只需要设置CORS。 我通常使用barryvdh / laravel-cors包来做这件事 ,这使得它很容易安装。 I believe you just have to setup CORS. I usually do this up using the barryvdh/laravel-cors package which makes it very easy to setup.
  • 我所做的阅读表明我需要生成一个CA,然后使用该CA生成服务器和客户端证书。 这是做到这一点的一种方式,但在这种情况下不适用。 您的HAProxy需要配置一个由受信任的CA签名的有效SSL证书 - 不是签署客户端证书的那个,也不是您创建的证书。 它必须是一个由公共信任CA签署的证书,其根证书位于API网关后端系统的信任存储区中......这应与您的Web浏览器信任的基本相同,但可能是子集。 正如您的Web浏览器不会向运行自签名证书的服务器提供SSL一样,而不会引发必须绕过的警告,API网关的后端将不会与不受信 ...
  • 通过OWIN我假设你指的是带有Web API 2的Katana ,它们都实现了OWIN。 在这种情况下,选择实际上是在“经典”Web API 2与Katana和较新的ASP.NET Core与WebListener之间。 我总是推荐使用带有WebListener的ASP.NET Core,原因如下: 我们在Service Fabric中为ASP.NET Core提供了官方集成NuGet包 记录这些包及其用例 Katana在很大程度上是ASP.NET Core的原型。 大多数(如果不是全部)新功能的工作都是进 ...
  • Vue和Express应用程序使用相同的语言编写,所以最好将这些作为独立的项目。 这些完全不同的项目在做不同的事情,所以他们应该分开。 您已经部署到Heroku,所以SSL / TLS不是您真正关心的问题。 但是,如果您正在部署到自己的VPS,则需要使用Let's Encrypt 。 为了限制从Express到Vue应用程序的请求,您需要查看CORS 。 有关更多详细信息,请参阅expressjs / cors 。 Express应用程序是连接到您的数据库的服务。 如果你试图从你的Vue应用程序直接连接到你 ...
  • 是否有可能让它们都运行在相同的天青网服务上? 或者我需要为每个服务提供独立服务? 如果您在Windows OS上选择Web App,则IIS允许您在单个网站中配置多个虚拟应用程序。 对于这种方法,您可以按照将多个虚拟目录部署到单个Azure网站 。 注意:多个虚拟应用程序将共享相同的应用程序池。 正如kim所说, 您支付应用服务计划,而不是为Web应用程序 。 您也可以在同一应用程序服务计划下的不同Web应用程序中托管nodejs后端和角度前端。 对于部署,您可以利用VS发布向导或通过KUDU或FTP手动上 ...
  • 在API网关控制台中,创建资源(例如/ v1 / user / info)和方法(例如GET / POST等)。 选择集成请求 然后,您可以配置任何其他AWS资源的HTTP代理或Lambda函数。 在您的情况下,您希望它指向您的EC2托管URL。 In the API Gateway Console, create a resource (eg. /v1/user/info) and method (eg. GET/POST etc). Select Integration Request You can ...
  • 最后,我解决了(502)网关问题。 问题出在内部VNET中的“ 集成API管理”和“应用程序网关”手册中。 错误的行: #Step 13 $result = Set-AzureRmApiManagementHostnames -Name $apiManagementServiceName -ResourceGroupName "$resourceGroupName" –PortalHostnameConfiguration $proxyHostnameConfig 要为API代理设置自定义域名-Proxy ...
  • 根据常见问题解答,这是不可能的: [A]使用Amazon API Gateway创建的API仅显示HTTPS端点。 Amazon API Gateway不支持未加密(HTTP)端点。 https://aws.amazon.com/api-gateway/faqs/#general According to the FAQ, this is not possible: [A]ll of the APIs created with Amazon API Gateway expose HTTPS endpoint ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。