![](/img/trans.png)
[英]How to make Background keyword as a runner scenario in cucumber?
我正在嘗試使用 selenium 和 cucumber 上的 3 個場景測試亞馬遜網站。用於編寫小黃瓜結構。 我使用 Background 關鍵字將我的登錄功能與其他場景連接起來。 但這次的問題是我的場景編號從 3 減少到 2。基本上,我還想測試登錄功能並關閉終端和 go 到其他測試場景。 相反, ...
[英]How to make Background keyword as a runner scenario in cucumber?
我正在嘗試使用 selenium 和 cucumber 上的 3 個場景測試亞馬遜網站。用於編寫小黃瓜結構。 我使用 Background 關鍵字將我的登錄功能與其他場景連接起來。 但這次的問題是我的場景編號從 3 減少到 2。基本上,我還想測試登錄功能並關閉終端和 go 到其他測試場景。 相反, ...
[英]Reuse and concat my Login Scenario to other Scenarios in Cucumber Java with Selenium
我正在嘗試使用 3 種場景測試亞馬遜網站。 首次登錄場景完成時。 當嘗試其他場景時,它會進入初始狀態,並且在嘗試將產品添加到購物車時不登錄。 基本上,我想先登錄並將此功能連接到 Cucumber Selenium 中的其他場景或功能。 下面的小黃瓜語言是我的 Amazon.feature; 很可能我 ...
[英]Passing parameters in cucumber steps
我試圖在 cucumber 步驟中傳遞一個參數,但該方法有兩個這是我的代碼 有什么想法只傳遞名字嗎? ...
[英]Filtering Behat tags by Feature tags and Scenario tags
假設我有 3 個功能文件,每個文件有 3 個場景。 我希望能夠只使用 @env1 為 @method2 運行場景。 如果我使用 "--tags="@env1&&@method2"所有帶有 @env1 的場景都會運行。 ...
[英]Testing assertion with value and response time - Karate
我嘗試將響應時間與一定時間進行比較,但我不知道該怎么做。 我什至不知道我給的數字是秒還是毫秒這是我的代碼: 場景: Case Given url 'https://reqres.in/api/users?page=2' 當方法 GET 然后打印 responseTime * def time = r ...
[英]How to run all cucumber tests with a command ? How to setup pom.xml file for this
我在本地機器上有一個 cucumber 項目,它的副本在 git 上。當我在本地運行項目時 - 測試運行成功。但是當我在 cmd 中使用 mvn test 命令時,沒有找到測試。 我在我的 pom.xml 中使用 junit pom.xml RunnerTest.java 測試.java 我的項 ...
[英]I can not locate dropdown element which are not select tag
我無法在 Selnium 中找到不是 select 標簽的下拉元素。 我想從點擊后打開的選項中選擇 select。 ...
[英]If there are 1000 features files in Cucumber feature file and I want to execute only even feature files. how to do that?
src/test/resources 中的 1000 個功能文件。 我只想運行偶數(2、4、6、……1000)的功能文件,我們該怎么做? 我試圖將它們分組,但不確定這樣會是個好方法。 ...
[英]How to stop pytest_bdd from performing the teardown steps after each iteration of a Gherkin Scenario Outline?
我有以下小黃瓜場景大綱: 和各自的test.py:from pytest_bdd import scenario, given, when, then @scenario("test.feature", "Links on main page") def test_links(): pass ...
[英]How to use dynamic parameter name in java method?
首先我有這樣的方法; 我用小黃瓜風格稱這種方法; 當我在 BDD 結構中調用具有不同名稱的令牌時( When I send google-login-api with "google token success" token ),我希望方法參數名稱也發生變化。 例如,當我使用 BDD 樣式調用 x ...
[英]Is it ok to use empty lines between gherkin test steps?
我們的團隊正在審查一些約定,需要一些指導。 因此,人們希望將設置(由 Given 語句表示)動作(When)和斷言(Then)分開。 可以在小黃瓜測試步驟之間使用空行嗎? 這種方法有什么缺點? 因為在 cucumber 網站上沒有規定不這樣做。 ...
[英]HOOK-ERROR in before_scenario: TypeError: Application() takes no arguments
我正在嘗試使用以下堆棧自動化 Windows 10 上的桌面應用程序: Python + Appium + WinAppDriver 。 我使用 Gherkin 語言和 Page Object 模式。 運行功能文件后,我有一個失敗的結果,在before_scenario: TypeError: A ...
[英]Python: How do I translate testing data tables from Javascript to Python
我是 Python 的新手。 I currently have this code in Javascript (using Cypress) but unfortunately, I had issues with the iframe using Firefox so we switched ...
[英]PyCharm: Cannot navigate to step definitions
我目前正在使用 Behave 在 PyCharm 中編寫測試。 我的功能文件中的測試工作正常,但當我嘗試command + click步驟定義時,它不會導航到它。 我安裝了 Gherkin 插件和這些包。 我也嘗試安裝 Cucumber+ 但仍然沒有成功。 我錯過了什么嗎? ...
[英]Two examples for same scenario outline Gherkin
我需要驗證一堆使用我們模板的網站。 登錄后,我需要驗證許多信息,這些信息將放在第二個表中。 如何編寫小黃瓜代碼,以便對於表“userinfo”中的每個項目,它都會遍歷表“siteinfo”中的所有項目。 我看到通過 userinfo.url 或 siteMenu.menuiitem 調用它們時出錯。 ...
[英]Is there a way to run only selective examples from a cucumber scenario outline?
我有一個 Cucumber .feature文件,其場景大綱如下所示。 有沒有辦法在測試運行期間只運行示例表中的特定行? 現在,我需要將其拆分為兩個場景大綱,並將其中一個標記為@ignore來完成此操作。 cucumber 是否提供了一種在執行期間過濾示例的方法,可能基於示例表中的列? ...
[英]Parsing Cucumber Feature Files into JSON or NDJSON using Java with Cucumber 7.6.0 or Gherkin-Java 24.0.0
問題的背景: 上一期: 我過去已經用下面的附加線程問過這個問題,但在那種情況下用例是不同的。 我只需要一種使用 (NodeJS) cucumber-js 將 JSON 打印到標准輸出的方法。 我按照( https://github.com/cucumber/cucumber-js/blob.m/ ...
[英]How to write down the scenario outline example in cucumber, when you want to skip any column value and that column is mandatory for other test
col1 col2 col3 一三二三對於 Col2,“Than”中沒有可比較的值,因此需要跳過。 但是此列具有與其他測試進行比較的價值。 ...
[英]How to convert or parse a Gherkin Feature FIle into JSON object using Python
How to convert or parse a Gherkin Feature FIle into JSON object using Python I have a Cucumber Gherkin file that needs to be converted into JSON obj ...