小编mma*_*mar的帖子

如何将GitHub问题导出到Excel?

如何将我的所有问题从Enterprise GitHub存储库导出到Excel文件?我尝试过搜索许多Stack Overflow答案,但没有成功.我也试过这个解决方案(将Git问题导出到CSV并获得"ImportError:No module named requests"错误.是否有任何工具或任何简单的方法将所有问题导出到Excel?

excel github github-api github-enterprise

26
推荐指数
5
解决办法
3万
查看次数

是否有像Background这样的After关键字可用于运行黄瓜步骤

我知道背景关键字可用于在运行每个场景之前运行常见步骤。同样,是否有类似“After”关键字的内容可用于每个场景之后的公共步骤,而不是像 after hooks 这样的 java 代码中的逻辑步骤,我的意思是在小黄瓜步骤本身中。我需要像下面这样

Background
Given I use the API header information
  | Content-Type | application/json;v=3 |
And I connect to postgresql

Scenario Outline:
    And I get the "Request" payload from "5NB_CARD-A_Request" file for the scenario "CardA_Scenario1"
    And I store the input payload individual field details for database validation
    And I form a client with this resource url "/transaction"
    When I make a POST call and capture the response
    And I get the "response" payload from "5NB_CARD-A_Response" file …
Run Code Online (Sandbox Code Playgroud)

cucumber gherkin cucumber-jvm atdd

7
推荐指数
1
解决办法
4898
查看次数

在 exceljs 上提交错误

我尝试创建 Excel,但出现提交错误。我的代码有什么问题。如果我删除sheet.commit()并且workbook.commit()程序工作正常。

\n\n
const Excel = require(\'exceljs\');\nconst fs = require(\'fs\');\n\nconst workbook = new Excel.Workbook();\nconst sheet = workbook.addWorksheet("MySheet");\nconst writeToExcel = fs.createWriteStream("./test/testfile.xlsx");\n\nsheet.columns = [\n    { header: \'Id\', key: \'id\', width: 10 },\n    { header: \'Name\', key: \'name\', width: 40 },\n    { header: \'DOB\', key: \'dob\', width: 10, outlineLevel: 1}\n];\n\n\nlet names = [\'Windows\', \'Mac Os\', \'Ubuntu\', \'B OS\'];\nlet i = 2;\n\nnames.forEach( (singleName) => {\n    let row = sheet.getRow(i);\n    row.values = {\n        id: i-1,\n        name: singleName,\n        dob: new Date()\n    };\n …
Run Code Online (Sandbox Code Playgroud)

javascript node.js exceljs

7
推荐指数
1
解决办法
7301
查看次数

功能级别的任何黄瓜 Before 和 After 挂钩

我已经经历过很多帮助,但都是关于场景级别的解释。Cucumber JVM 是否有功能级别的 Before 和 After 挂钩?这个页面cucumber Hook讲述了ruby语言,但是我可以获得java的帮助吗?

java selenium rest-assured cucumber-jvm

6
推荐指数
1
解决办法
1万
查看次数

红宝石中'do..end'和"{..}"块的不同行为

很抱歉,这个问题是重复的.但我无法找到使用上的差异.当我运行以下代码时,我得到了不同的答案.我从大多数教程中看到,使用"do ... end"与"{...}"块相同.

include Comparable

a = [1, 4, 2, 3, 5]

p a.sort do |x,y|
    y <=> x
end
Run Code Online (Sandbox Code Playgroud)

输出显示为= [1,2,3,4,5]

但是当我这样跑的时候......

include Comparable

a = [1, 4, 2, 3, 5]

p a.sort { |x,y|
    y <=> x
}
Run Code Online (Sandbox Code Playgroud)

输出显示为= [5,4,3,2,1]

这里有什么问题.是否存在两种语法有任何不同行为的情况?

ruby

3
推荐指数
1
解决办法
87
查看次数

如何通过搜索单元格文本获得excel列索引?

我有一个excel文件,其中包含标题行和许多列.在第1行中,第10列i的单元格值为"请求".我需要通过搜索值"请求"来获取此单元格索引.有没有任何方法没有迭代列(不使用for循环).

excel

2
推荐指数
1
解决办法
5万
查看次数

通过忽略黄瓜中的顺序来断言两个json内容

我正在像这样比较 ruby​​+cucumber 中的两个 json 内容或对象,但是当我比较时,它不会忽略内容的顺序(如果内容发生变化)。我知道这个语句比较为两个字符串。那么无论如何我可以通过忽略其顺序来比较两个json对象?

expect(@act_resp_excl_key).to eq(exp_data_excl_key)
Run Code Online (Sandbox Code Playgroud)

使用上述详细信息添加更多信息。我有两个 json 文档,如下所示。

json1 = {
    "entries" =  > [{
                "doingBusinessAsName" =  > "KROGER FOODS",
                "legalName" =  > "Kroger-Corps"
            }
        ]
}

json2 = {
    "entries" =  > [{
                "legalName" =  > "Kroger-Corps"
                "doingBusinessAsName" =  > "KROGER FOODS",
            }
        ]
}
Run Code Online (Sandbox Code Playgroud)

当我在 ruby​​+cucumber 中比较这两个 json 时,我得到的结果是失败。但逻辑上它是一样的,我应该通过。我使用上面的比较语句来验证两个json。

@tgf,我使用了您指定的语句,但我的比较仍然失败。你能帮我看看是什么问题吗?

expect(JSON.parse(@act_resp_excl_key)).to eq JSON.parse(exp_data_excl_key)
Run Code Online (Sandbox Code Playgroud)

ruby json cucumber

1
推荐指数
1
解决办法
2336
查看次数

量角器配置文件没有拿起黄瓜步骤定义

我是量角器和黄瓜框架的新手.我按照量角器站点和https://semaphoreci.com/community/tutorials/getting-started-with-protractor-and-cucumber的步骤进行操作.我有一个配置文件配置黄瓜框架选项,功能文件和步骤定义文件.但是当我运行我的cucumber-config文件时,它无法识别我的步骤定义并且总是抛出错误.对此有何帮助?下面是我的设置文件.

量角器文件夹结构

//cucumber-config.js

exports.config = {
  seleniumAddress: 'http://localhost:4444/wd/hub',
  capabilities: {
      browserName:'chrome'
  },
  framework: 'custom',
  frameworkPath: require.resolve('protractor-cucumber-framework'),
  specs: [
    './features/*.feature'
  ],
  cucumberOpts: {
    require: ['./features/step_definitions/*.steps.js'],
    tags: [],
    strict: true,
    format: ["pretty"],
    dryRun: false,
    compiler: []
  },
  onPrepare: function () {
    browser.manage().window().maximize();
  }
};
Run Code Online (Sandbox Code Playgroud)

//testone.feature

#features/test.feature
Feature: Running Cucumber with Protractor

    Scenario: Protractor and Cucumber Test
        Given I go to "https://angularjs.org/"
        When I add "Be Awesome" in the task field
        And I click the add button
        Then I should see my …
Run Code Online (Sandbox Code Playgroud)

cucumber protractor cucumberjs

1
推荐指数
1
解决办法
3650
查看次数