Data Driven testing with cucumber protractorHow to implement different data for cucumber scenarios based on environmentError when running Cucumber Junit test :Intializationerrorcucumber.runtime.CucumberException: No features found at []Java Cucumber: How to get string parameter values from all the steps in a single scenarioData driven testing in Cucumber using Excel sheetsFetching data from json file in protractorCucumber Java error java.lang.AbstractMethodErrorExceptions while running Cucumber TestsProtractor Data Driven test with Cucumbercucumber and protractor html and json

How can you evade tax by getting employment income just in equity, then using this equity as collateral to take out loan?

Why doesn't the "ch" pronunciation rule occur for words such as "durch" and "manchmal"?

Buffering in WGS 84 / Pseudo-Mercator 3857 using QGIS?

Word or idiom defining something barely functional

Why does Intel's Haswell chip allow FP multiplication to be twice as fast as addition?

Why is there a need to prevent a racist, sexist, or otherwise bigoted vendor from discriminating who they sell to?

What are these two charactes marked red

Unique combinations of a list of tuples

Ex-contractor published company source code and secrets online

Performance of a branch and bound algorithm VS branch-cut-heuristics

In Pokémon Go, why does one of my Pikachu have an option to evolve, but another one doesn't?

How to mark beverage cans in a cooler for a blind person?

How can I tell if a flight itinerary is fake?

Was this a rapid SCHEDULED disassembly? How was it done?

Why are the inside diameters of some pipe larger than the stated size?

First amendment and employment: Can an employer terminate you for speech?

Am I overreacting to my team leader's unethical requests?

In reversi, can you overwrite two chips in one move?

Author changing name

Generator for parity?

How to vertically align the three columns of my table top, top, middle

Is refreshing multiple times a test case for web applications?

Best way to divide CPU along all sql instances on 1 server

Write an interpreter for *



Data Driven testing with cucumber protractor


How to implement different data for cucumber scenarios based on environmentError when running Cucumber Junit test :Intializationerrorcucumber.runtime.CucumberException: No features found at []Java Cucumber: How to get string parameter values from all the steps in a single scenarioData driven testing in Cucumber using Excel sheetsFetching data from json file in protractorCucumber Java error java.lang.AbstractMethodErrorExceptions while running Cucumber TestsProtractor Data Driven test with Cucumbercucumber and protractor html and json






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Lets say I have a scenario in my demo.feature file



Scenario Outline: Gather and load all submenus
Given I will login using <username> and <password>
When I will click all links
Examples :
| username | password |
| user1 | pass1 |
| use2 | pass2 |


lets say i have a file called users.json



How can i get those usernames and passwords from that external file to my demo.feature ?
Can I catch the file by passing parameters to my npm script like below ?
npm run cucumber -- --params.environment.file=usernames.json










share|improve this question






























    0















    Lets say I have a scenario in my demo.feature file



    Scenario Outline: Gather and load all submenus
    Given I will login using <username> and <password>
    When I will click all links
    Examples :
    | username | password |
    | user1 | pass1 |
    | use2 | pass2 |


    lets say i have a file called users.json



    How can i get those usernames and passwords from that external file to my demo.feature ?
    Can I catch the file by passing parameters to my npm script like below ?
    npm run cucumber -- --params.environment.file=usernames.json










    share|improve this question


























      0












      0








      0








      Lets say I have a scenario in my demo.feature file



      Scenario Outline: Gather and load all submenus
      Given I will login using <username> and <password>
      When I will click all links
      Examples :
      | username | password |
      | user1 | pass1 |
      | use2 | pass2 |


      lets say i have a file called users.json



      How can i get those usernames and passwords from that external file to my demo.feature ?
      Can I catch the file by passing parameters to my npm script like below ?
      npm run cucumber -- --params.environment.file=usernames.json










      share|improve this question














      Lets say I have a scenario in my demo.feature file



      Scenario Outline: Gather and load all submenus
      Given I will login using <username> and <password>
      When I will click all links
      Examples :
      | username | password |
      | user1 | pass1 |
      | use2 | pass2 |


      lets say i have a file called users.json



      How can i get those usernames and passwords from that external file to my demo.feature ?
      Can I catch the file by passing parameters to my npm script like below ?
      npm run cucumber -- --params.environment.file=usernames.json







      protractor cucumber gherkin cucumberjs






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 27 at 7:35









      AMendisAMendis

      2711 gold badge3 silver badges6 bronze badges




      2711 gold badge3 silver badges6 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          0














          I recommend having the login step access that json file within the step definition. Just make sure not to check it into the repo and instead always expect it to be in a location but only locally and not in the repository.



          Doing the above is useful for a couple of reasons:
          - An engineer running your tests does not need to know that a param must be passed in from the command line
          - The code is self-descriptive in that step as to how it logs in
          - You can add better error handling
          - You can use multiple user files if needs be by having hooks define paths etc based on tags






          share|improve this answer
























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55371963%2fdata-driven-testing-with-cucumber-protractor%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I recommend having the login step access that json file within the step definition. Just make sure not to check it into the repo and instead always expect it to be in a location but only locally and not in the repository.



            Doing the above is useful for a couple of reasons:
            - An engineer running your tests does not need to know that a param must be passed in from the command line
            - The code is self-descriptive in that step as to how it logs in
            - You can add better error handling
            - You can use multiple user files if needs be by having hooks define paths etc based on tags






            share|improve this answer





























              0














              I recommend having the login step access that json file within the step definition. Just make sure not to check it into the repo and instead always expect it to be in a location but only locally and not in the repository.



              Doing the above is useful for a couple of reasons:
              - An engineer running your tests does not need to know that a param must be passed in from the command line
              - The code is self-descriptive in that step as to how it logs in
              - You can add better error handling
              - You can use multiple user files if needs be by having hooks define paths etc based on tags






              share|improve this answer



























                0












                0








                0







                I recommend having the login step access that json file within the step definition. Just make sure not to check it into the repo and instead always expect it to be in a location but only locally and not in the repository.



                Doing the above is useful for a couple of reasons:
                - An engineer running your tests does not need to know that a param must be passed in from the command line
                - The code is self-descriptive in that step as to how it logs in
                - You can add better error handling
                - You can use multiple user files if needs be by having hooks define paths etc based on tags






                share|improve this answer













                I recommend having the login step access that json file within the step definition. Just make sure not to check it into the repo and instead always expect it to be in a location but only locally and not in the repository.



                Doing the above is useful for a couple of reasons:
                - An engineer running your tests does not need to know that a param must be passed in from the command line
                - The code is self-descriptive in that step as to how it logs in
                - You can add better error handling
                - You can use multiple user files if needs be by having hooks define paths etc based on tags







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 27 at 16:58









                Raymond KellyRaymond Kelly

                4173 silver badges15 bronze badges




                4173 silver badges15 bronze badges





















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55371963%2fdata-driven-testing-with-cucumber-protractor%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현