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;
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
add a comment |
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
add a comment |
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
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
maven cucumber
asked Mar 25 at 16:06
user1140969user1140969
284 bronze badges
284 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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>
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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>
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
add a comment |
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>
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
add a comment |
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>
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>
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
add a comment |
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
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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