Overriding Parameters in included suites

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Overriding Parameters in included suites

Hubert Grzeskowiak
Hi,

I have a few suites that are domain-specific. With "domain" I mean different kinds of tests like e.g. unit tests, browser based tests and so on.
All tests are running for a specific development stage - given with the "stage" parameter, so that I can set a stage to test in e.g. my browser based tests suite.

I also have suites that run all tests against a specific stage. For that I create suites called e.g. all-qa-suite.xml which basically consist of included suites which looks something like this:
<suite-files>
<suite-file path="src/test/suites/browser-based-tests-suite.xml" />
...
I want to be able to run both types of suites.

However, when I set a parameter ("stage") both in my all-qa-suite.xml AND in my browser-based-tests-suite.xml the parameter from browser-based-tests-suite.xml takes precedence, so that I cannot override the parameter effectively making the combined stage-specific suites almost useless.

Is there a workaround for this?
Reply | Threaded
Open this post in threaded view
|

Re: Overriding Parameters in included suites

Krishnan Mahadevan
Why not remove the parameter named "stage" as a TestNG parameter and instead define it as a JVM argument ?

That way, you could achieve what you are looking for.

Would that work ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


On Mon, Jan 6, 2014 at 9:04 PM, Hubert Grzeskowiak <[hidden email]> wrote:
Hi,

I have a few suites that are domain-specific. With "domain" I mean different
kinds of tests like e.g. unit tests, browser based tests and so on.
All tests are running for a specific development stage - given with the
"stage" parameter, so that I can set a stage to test in e.g. my browser
based tests suite.

I also have suites that run all tests against a specific stage. For that I
create suites called e.g. all-qa-suite.xml which basically consist of
included suites which looks something like this:
<suite-files>
<suite-file path="src/test/suites/browser-based-tests-suite.xml" />
...
I want to be able to run both types of suites.

However, when I set a parameter ("stage") both in my all-qa-suite.xml AND in
my browser-based-tests-suite.xml the parameter from
browser-based-tests-suite.xml takes precedence, so that I cannot override
the parameter effectively making the combined stage-specific suites almost
useless.

Is there a workaround for this?



--
View this message in context: http://testng.1065351.n5.nabble.com/Overriding-Parameters-in-included-suites-tp19258.html
Sent from the testng-users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

AW: [testng-users] Overriding Parameters in included suites

Hubert Grzeskowiak

Hi Krishnan,

thanks for the reply. That’s what we do right now, alongside commenting out the parameter line in the domain-specific suites. However, setting that JVM parameter through our IDE is an non-intuitive and tedious task. It would be great if we could somehow define a priority of the parameter in xml so that if multiple are given, the one with highest priority is used.

Thanks and Regards
Hugo

Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Krishnan Mahadevan
Gesendet: Dienstag, 7. Januar 2014 14:28
An: [hidden email]
Betreff: Re: [testng-users] Overriding Parameters in included suites

 

Why not remove the parameter named "stage" as a TestNG parameter and instead define it as a JVM argument ?

 

That way, you could achieve what you are looking for.

 

Would that work ?


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

 

On Mon, Jan 6, 2014 at 9:04 PM, Hubert Grzeskowiak <[hidden email]> wrote:

Hi,

I have a few suites that are domain-specific. With "domain" I mean different
kinds of tests like e.g. unit tests, browser based tests and so on.
All tests are running for a specific development stage - given with the
"stage" parameter, so that I can set a stage to test in e.g. my browser
based tests suite.

I also have suites that run all tests against a specific stage. For that I
create suites called e.g. all-qa-suite.xml which basically consist of
included suites which looks something like this:
<suite-files>
<suite-file path="src/test/suites/browser-based-tests-suite.xml" />
...
I want to be able to run both types of suites.

However, when I set a parameter ("stage") both in my all-qa-suite.xml AND in
my browser-based-tests-suite.xml the parameter from
browser-based-tests-suite.xml takes precedence, so that I cannot override
the parameter effectively making the combined stage-specific suites almost
useless.

Is there a workaround for this?



--
View this message in context: http://testng.1065351.n5.nabble.com/Overriding-Parameters-in-included-suites-tp19258.html
Sent from the testng-users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

 

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to
[hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: AW: [testng-users] Overriding Parameters in included suites

Krishnan Mahadevan
Hugo,

I did some googling around this and I guess TestNG by design honours the value that it sees for the same parameter in the child suite. So I don't know if there is any other way of getting this done.
Yes I u'stand that setting a JVM parameter via the IDE is a tedious task, but I believe you would be using the IDE only for the development of tests. Once they are done you would be leveraging a build tool [ Ant/Maven] to kick off your tests. Wouldn't you ?



Thanks and Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"


From: Hubert Grzeskowiak <[hidden email]>
Reply-To: <[hidden email]>
Date: Tuesday, 7 January 2014 8:41 PM
To: "[hidden email]'" <[hidden email]>
Subject: AW: [testng-users] Overriding Parameters in included suites

Hi Krishnan,

thanks for the reply. That’s what we do right now, alongside commenting out the parameter line in the domain-specific suites. However, setting that JVM parameter through our IDE is an non-intuitive and tedious task. It would be great if we could somehow define a priority of the parameter in xml so that if multiple are given, the one with highest priority is used.

Thanks and Regards
Hugo

Von: [hidden email] [[hidden email]] Im Auftrag von Krishnan Mahadevan
Gesendet: Dienstag, 7. Januar 2014 14:28
An: [hidden email]
Betreff: Re: [testng-users] Overriding Parameters in included suites

 

Why not remove the parameter named "stage" as a TestNG parameter and instead define it as a JVM argument ?

 

That way, you could achieve what you are looking for.

 

Would that work ?


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

 

On Mon, Jan 6, 2014 at 9:04 PM, Hubert Grzeskowiak <[hidden email]> wrote:

Hi,

I have a few suites that are domain-specific. With "domain" I mean different
kinds of tests like e.g. unit tests, browser based tests and so on.
All tests are running for a specific development stage - given with the
"stage" parameter, so that I can set a stage to test in e.g. my browser
based tests suite.

I also have suites that run all tests against a specific stage. For that I
create suites called e.g. all-qa-suite.xml which basically consist of
included suites which looks something like this:
<suite-files>
<suite-file path="src/test/suites/browser-based-tests-suite.xml" />
...
I want to be able to run both types of suites.

However, when I set a parameter ("stage") both in my all-qa-suite.xml AND in
my browser-based-tests-suite.xml the parameter from
browser-based-tests-suite.xml takes precedence, so that I cannot override
the parameter effectively making the combined stage-specific suites almost
useless.

Is there a workaround for this?



--
View this message in context: http://testng.1065351.n5.nabble.com/Overriding-Parameters-in-included-suites-tp19258.html
Sent from the testng-users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

 

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to
[hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.