How do I use cucumber profile to dynamically use different environment hostname, testdata, testGroup. I am using cucumber, java, mavenMaven ant task not getting executed while running cucumber testsHow should I configure the eclipse to make use of different values of environment variable for different maven phases, during maven building process?Running automated tests for specified platform (Android or iOS). Only one platform per launch. How to specify which platform must be run by Maven?Maven profiles for different environments - bad practice?Maven + Cucumber-jvm - How to run different subset of the features depending on environmentHow can I invoke @after once for many scenarios?Cucumber-jvm execute tagged scenarioDcucumber.options, run a single cucumber testHow to pass parameters to a cucumber+maven project so they can be used in tests?Tests with multi-line string are marked as passed when run separately (java+maven+cucumber)How to define different behavior for JUnit @Before hook with Maven and Cucumber

Are there any double stars that I can actually see orbit each other?

Could the crash sites of the Apollo 11 and 16 LMs be seen by the LRO?

3D-Plot with an inequality condition for parameter values

Possible isometry groups of open manifolds

Is killing off one of my queer characters homophobic?

Do native speakers use ZVE or CPU?

What are the arguments for California’s nonpartisan blanket primaries other than giving Democrats more power?

How can I legally visit the United States Minor Outlying Islands in the Pacific?

Are L-functions uniquely determined by their values at negative integers?

Nested-Loop-Join: How many comparisons and how many pages-accesses?

What is the closed form of the following recursive function?

Does optical correction give a more aesthetic look to the SBI logo?

HackerRank: Electronics Shop

How would someone destroy a black hole that’s at the centre of a planet?

Why linear regression uses "vertical" distance to the best-fit-line, instead of actual distance?

Why didn't Al Powell investigate the lights at the top of the building?

I have accepted an internship offer. Should I inform companies I have applied to that have not gotten back to me yet?

Confused about 誘われて (Sasowarete)

Adding a vertical line at the right end of the horizontal line in frac

Is it rude to tell recruiters I would only change jobs for a better salary?

What impact would a dragon the size of Asia have on the environment?

how to generate correct single and double quotes in tex

How would you write do the dialogues of two characters talking in a chat room?

Can I activate an iPhone without an Apple ID?



How do I use cucumber profile to dynamically use different environment hostname, testdata, testGroup. I am using cucumber, java, maven


Maven ant task not getting executed while running cucumber testsHow should I configure the eclipse to make use of different values of environment variable for different maven phases, during maven building process?Running automated tests for specified platform (Android or iOS). Only one platform per launch. How to specify which platform must be run by Maven?Maven profiles for different environments - bad practice?Maven + Cucumber-jvm - How to run different subset of the features depending on environmentHow can I invoke @after once for many scenarios?Cucumber-jvm execute tagged scenarioDcucumber.options, run a single cucumber testHow to pass parameters to a cucumber+maven project so they can be used in tests?Tests with multi-line string are marked as passed when run separately (java+maven+cucumber)How to define different behavior for JUnit @Before hook with Maven and Cucumber






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








0















I have test cases written in feature files. The test cases are tagged per requirements.
I want these test cases to be executed on different environments, using maven command, by passing profile name.
Each profile will have hostname, username, password for particular environment.
How do I achieve this?



@stage_ready
Feature: GUI Tests
Background:
Given the site <hostname> is reached using "Chrome" browser
When maximize window
And credentials <user_host> is typed into the "sd_username_editbox"
And credentials <password_host> is typed into the "sd_password_editbox"
And the "sd_login_button" button is clicked


CommandLine:



mvn test -Dcucumber.options=”–tags @stage_ready” -p profile_name


I want to know how to write profile, which will have parameters like hostname, user_host, password_host for different profiles and be dynamically used in the cucumber steps, that I have marked in angle brackets for reference.










share|improve this question




























    0















    I have test cases written in feature files. The test cases are tagged per requirements.
    I want these test cases to be executed on different environments, using maven command, by passing profile name.
    Each profile will have hostname, username, password for particular environment.
    How do I achieve this?



    @stage_ready
    Feature: GUI Tests
    Background:
    Given the site <hostname> is reached using "Chrome" browser
    When maximize window
    And credentials <user_host> is typed into the "sd_username_editbox"
    And credentials <password_host> is typed into the "sd_password_editbox"
    And the "sd_login_button" button is clicked


    CommandLine:



    mvn test -Dcucumber.options=”–tags @stage_ready” -p profile_name


    I want to know how to write profile, which will have parameters like hostname, user_host, password_host for different profiles and be dynamically used in the cucumber steps, that I have marked in angle brackets for reference.










    share|improve this question
























      0












      0








      0








      I have test cases written in feature files. The test cases are tagged per requirements.
      I want these test cases to be executed on different environments, using maven command, by passing profile name.
      Each profile will have hostname, username, password for particular environment.
      How do I achieve this?



      @stage_ready
      Feature: GUI Tests
      Background:
      Given the site <hostname> is reached using "Chrome" browser
      When maximize window
      And credentials <user_host> is typed into the "sd_username_editbox"
      And credentials <password_host> is typed into the "sd_password_editbox"
      And the "sd_login_button" button is clicked


      CommandLine:



      mvn test -Dcucumber.options=”–tags @stage_ready” -p profile_name


      I want to know how to write profile, which will have parameters like hostname, user_host, password_host for different profiles and be dynamically used in the cucumber steps, that I have marked in angle brackets for reference.










      share|improve this question














      I have test cases written in feature files. The test cases are tagged per requirements.
      I want these test cases to be executed on different environments, using maven command, by passing profile name.
      Each profile will have hostname, username, password for particular environment.
      How do I achieve this?



      @stage_ready
      Feature: GUI Tests
      Background:
      Given the site <hostname> is reached using "Chrome" browser
      When maximize window
      And credentials <user_host> is typed into the "sd_username_editbox"
      And credentials <password_host> is typed into the "sd_password_editbox"
      And the "sd_login_button" button is clicked


      CommandLine:



      mvn test -Dcucumber.options=”–tags @stage_ready” -p profile_name


      I want to know how to write profile, which will have parameters like hostname, user_host, password_host for different profiles and be dynamically used in the cucumber steps, that I have marked in angle brackets for reference.







      maven cucumber






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 25 at 16:06









      user1140969user1140969

      284 bronze badges




      284 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          2














          From the Cucumber documentation:
          "Profiles are not available in Java."



          If you want to pass arguments to Maven, you can use Maven profiles



          For example (from the Maven link above):



          <project>
          ...
          <profiles>
          <profile>
          <id>appserverConfig-dev</id>
          <activation>
          <property>
          <name>env</name>
          <value>dev</value>
          </property>
          </activation>
          <properties>
          <appserver.home>/path/to/dev/appserver</appserver.home>
          </properties>
          </profile>

          <profile>
          <id>appserverConfig-dev-2</id>
          <activation>
          <property>
          <name>env</name>
          <value>dev-2</value>
          </property>
          </activation>
          <properties>
          <appserver.home>/path/to/another/dev/appserver2</appserver.home>
          </properties>
          </profile>
          </profiles>
          ..
          </project>





          share|improve this answer























          • Thanks for the information.

            – user1140969
            Apr 11 at 12:26











          • Hi, Can anyone tell me how can we use maven profile with cucumber ? I have created profile in POM but it is getting executed after cucumber tests. I expect then to get executed before tests so that maven ant tasks would be finished before test begins. Please check stackoverflow.com/questions/56311533/…

            – Nilesh G
            May 26 at 13:12










          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%2f55341945%2fhow-do-i-use-cucumber-profile-to-dynamically-use-different-environment-hostname%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









          2














          From the Cucumber documentation:
          "Profiles are not available in Java."



          If you want to pass arguments to Maven, you can use Maven profiles



          For example (from the Maven link above):



          <project>
          ...
          <profiles>
          <profile>
          <id>appserverConfig-dev</id>
          <activation>
          <property>
          <name>env</name>
          <value>dev</value>
          </property>
          </activation>
          <properties>
          <appserver.home>/path/to/dev/appserver</appserver.home>
          </properties>
          </profile>

          <profile>
          <id>appserverConfig-dev-2</id>
          <activation>
          <property>
          <name>env</name>
          <value>dev-2</value>
          </property>
          </activation>
          <properties>
          <appserver.home>/path/to/another/dev/appserver2</appserver.home>
          </properties>
          </profile>
          </profiles>
          ..
          </project>





          share|improve this answer























          • Thanks for the information.

            – user1140969
            Apr 11 at 12:26











          • Hi, Can anyone tell me how can we use maven profile with cucumber ? I have created profile in POM but it is getting executed after cucumber tests. I expect then to get executed before tests so that maven ant tasks would be finished before test begins. Please check stackoverflow.com/questions/56311533/…

            – Nilesh G
            May 26 at 13:12















          2














          From the Cucumber documentation:
          "Profiles are not available in Java."



          If you want to pass arguments to Maven, you can use Maven profiles



          For example (from the Maven link above):



          <project>
          ...
          <profiles>
          <profile>
          <id>appserverConfig-dev</id>
          <activation>
          <property>
          <name>env</name>
          <value>dev</value>
          </property>
          </activation>
          <properties>
          <appserver.home>/path/to/dev/appserver</appserver.home>
          </properties>
          </profile>

          <profile>
          <id>appserverConfig-dev-2</id>
          <activation>
          <property>
          <name>env</name>
          <value>dev-2</value>
          </property>
          </activation>
          <properties>
          <appserver.home>/path/to/another/dev/appserver2</appserver.home>
          </properties>
          </profile>
          </profiles>
          ..
          </project>





          share|improve this answer























          • Thanks for the information.

            – user1140969
            Apr 11 at 12:26











          • Hi, Can anyone tell me how can we use maven profile with cucumber ? I have created profile in POM but it is getting executed after cucumber tests. I expect then to get executed before tests so that maven ant tasks would be finished before test begins. Please check stackoverflow.com/questions/56311533/…

            – Nilesh G
            May 26 at 13:12













          2












          2








          2







          From the Cucumber documentation:
          "Profiles are not available in Java."



          If you want to pass arguments to Maven, you can use Maven profiles



          For example (from the Maven link above):



          <project>
          ...
          <profiles>
          <profile>
          <id>appserverConfig-dev</id>
          <activation>
          <property>
          <name>env</name>
          <value>dev</value>
          </property>
          </activation>
          <properties>
          <appserver.home>/path/to/dev/appserver</appserver.home>
          </properties>
          </profile>

          <profile>
          <id>appserverConfig-dev-2</id>
          <activation>
          <property>
          <name>env</name>
          <value>dev-2</value>
          </property>
          </activation>
          <properties>
          <appserver.home>/path/to/another/dev/appserver2</appserver.home>
          </properties>
          </profile>
          </profiles>
          ..
          </project>





          share|improve this answer













          From the Cucumber documentation:
          "Profiles are not available in Java."



          If you want to pass arguments to Maven, you can use Maven profiles



          For example (from the Maven link above):



          <project>
          ...
          <profiles>
          <profile>
          <id>appserverConfig-dev</id>
          <activation>
          <property>
          <name>env</name>
          <value>dev</value>
          </property>
          </activation>
          <properties>
          <appserver.home>/path/to/dev/appserver</appserver.home>
          </properties>
          </profile>

          <profile>
          <id>appserverConfig-dev-2</id>
          <activation>
          <property>
          <name>env</name>
          <value>dev-2</value>
          </property>
          </activation>
          <properties>
          <appserver.home>/path/to/another/dev/appserver2</appserver.home>
          </properties>
          </profile>
          </profiles>
          ..
          </project>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 26 at 6:35









          MaritMarit

          1,1357 silver badges19 bronze badges




          1,1357 silver badges19 bronze badges












          • Thanks for the information.

            – user1140969
            Apr 11 at 12:26











          • Hi, Can anyone tell me how can we use maven profile with cucumber ? I have created profile in POM but it is getting executed after cucumber tests. I expect then to get executed before tests so that maven ant tasks would be finished before test begins. Please check stackoverflow.com/questions/56311533/…

            – Nilesh G
            May 26 at 13:12

















          • Thanks for the information.

            – user1140969
            Apr 11 at 12:26











          • Hi, Can anyone tell me how can we use maven profile with cucumber ? I have created profile in POM but it is getting executed after cucumber tests. I expect then to get executed before tests so that maven ant tasks would be finished before test begins. Please check stackoverflow.com/questions/56311533/…

            – Nilesh G
            May 26 at 13:12
















          Thanks for the information.

          – user1140969
          Apr 11 at 12:26





          Thanks for the information.

          – user1140969
          Apr 11 at 12:26













          Hi, Can anyone tell me how can we use maven profile with cucumber ? I have created profile in POM but it is getting executed after cucumber tests. I expect then to get executed before tests so that maven ant tasks would be finished before test begins. Please check stackoverflow.com/questions/56311533/…

          – Nilesh G
          May 26 at 13:12





          Hi, Can anyone tell me how can we use maven profile with cucumber ? I have created profile in POM but it is getting executed after cucumber tests. I expect then to get executed before tests so that maven ant tasks would be finished before test begins. Please check stackoverflow.com/questions/56311533/…

          – Nilesh G
          May 26 at 13:12








          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%2f55341945%2fhow-do-i-use-cucumber-profile-to-dynamically-use-different-environment-hostname%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

          How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

          해남서초등학교 학교 연혁 학교 동문 외부 링크 둘러보기 메뉴북위 34° 34′ 21″ 동경 126° 35′ 50″ / 북위 34.5726385° 동경 126.5972670°  / 34.5726385; 126.5972670해남서초등학교eh