简体   繁体   English

我们如何使用量角器在不同的环境中运行规格

[英]How can we run specs in separate environments using Protractor

Is there a way we can run specs in different environments. 有没有一种方法可以在不同的环境中运行规范。 Perhaps, any configuration in the protractor-config file? 也许,量角器配置文件中有任何配置吗?

Doing something like 做类似的事情

specs: ['../tests/*.js', server1], ['../more_tests/*.js', server2]

in the configuration. 在配置中。

I don't know what you mean by "separate environment". 我不知道您所说的“分离环境”是什么意思。 If you want to run different specs based on different capabilities, this is how: 如果您要基于不同的功能运行不同的规格,请执行以下操作:

    exports.config = {

      specs: [
        'basic/*' // specs to be shared amongst all capabilities
      ],

      multiCapabilities: [{
        'browserName': 'chrome', // You can specify version, etc
        // uses 'basic/*'
      }, {
        'browserName': 'chrome', // You can specify version, etc
        specs: 'basic2/*' // 'basic/*' and 'basic2/*'
      }, {
        'browserName': 'firefox', // You can specify version, etc
        specs: 'basic3/*' // 'basic/*' and 'basic3/*'
      }]
    };

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM