calling parameters from another xml

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

calling parameters from another xml

JT_selenium
Hi,
I have parent xml and different child xmls. I want to declare all parameters in parent xml and need to get available in child xml so that i dont need to keep same parameters in all xmls. Is there any way i can do this. I got some solution like below but its not working

<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" [<!ENTITY parent SYSTEM "../parent.xml">]>

where above line is declared in child.xml to call parameters from parent.xml but its not working or not able to link parameters. If there is any other solution to link different xmls please let me know.

thanks,
JT



--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: calling parameters from another xml

Krishnan Mahadevan
I wasnt aware that TestNG suite xmls can extend each other. 

Cedric,
Is this present in TestNG ?


On Wednesday, May 29, 2013, JT_selenium wrote:
Hi,
I have parent xml and different child xmls. I want to declare all parameters in parent xml and need to get available in child xml so that i dont need to keep same parameters in all xmls. Is there any way i can do this. I got some solution like below but its not working

<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" [<!ENTITY parent SYSTEM "../parent.xml">]>

where above line is declared in child.xml to call parameters from parent.xml but its not working or not able to link parameters. If there is any other solution to link different xmls please let me know.

thanks,
JT



--
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 <a href="javascript:_e({}, &#39;cvml&#39;, &#39;testng-users%2Bunsubscribe@googlegroups.com&#39;);" target="_blank">testng-users+unsubscribe@....
To post to this group, send email to <a href="javascript:_e({}, &#39;cvml&#39;, &#39;testng-users@googlegroups.com&#39;);" target="_blank">testng-users@....
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
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/

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: calling parameters from another xml

Cédric Beust ♔-2
You can include suites in each other with the <suite-files> tag.


-- 
Cédric



On Tue, May 28, 2013 at 7:34 PM, Krishnan Mahadevan <[hidden email]> wrote:
I wasnt aware that TestNG suite xmls can extend each other. 

Cedric,
Is this present in TestNG ?


On Wednesday, May 29, 2013, JT_selenium wrote:
Hi,
I have parent xml and different child xmls. I want to declare all parameters in parent xml and need to get available in child xml so that i dont need to keep same parameters in all xmls. Is there any way i can do this. I got some solution like below but its not working

<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" [<!ENTITY parent SYSTEM "../parent.xml">]>

where above line is declared in child.xml to call parameters from parent.xml but its not working or not able to link parameters. If there is any other solution to link different xmls please let me know.

thanks,
JT



--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
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/

--
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?hl=en.
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: calling parameters from another xml

JT_selenium
Hi Cedric,
Any solutions where i can describe common parameters in one xml and call that xml in another test suites?

I dont want to use <suite-files> tag as i need to repeat all parameters again in different xmls which i dont want.

Any help will be appreciate.....
thanks,
Jt

On Wednesday, May 29, 2013 1:07:25 AM UTC-4, Cédric Beust ♔ wrote:
You can include suites in each other with the <suite-files> tag.


-- 
Cédric



On Tue, May 28, 2013 at 7:34 PM, Krishnan Mahadevan <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="AwvSL_RHjbQJ">krishnan.ma...@gmail.com> wrote:
I wasnt aware that TestNG suite xmls can extend each other. 

Cedric,
Is this present in TestNG ?


On Wednesday, May 29, 2013, JT_selenium wrote:
Hi,
I have parent xml and different child xmls. I want to declare all parameters in parent xml and need to get available in child xml so that i dont need to keep same parameters in all xmls. Is there any way i can do this. I got some solution like below but its not working

<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" [<!ENTITY parent SYSTEM "../parent.xml">]>

where above line is declared in child.xml to call parameters from parent.xml but its not working or not able to link parameters. If there is any other solution to link different xmls please let me know.

thanks,
JT



--
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 testng-users+unsubscribe@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
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/

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="AwvSL_RHjbQJ">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="AwvSL_RHjbQJ">testng...@....
Visit this group at http://groups.google.com/group/testng-users?hl=en.
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: calling parameters from another xml

JT_selenium
Got the solution where xml parameters can be defined at one place and can be called in mulitple suite files so need to declare common parameters again. 

Declare like below: 
<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" [<!ENTITY parent SYSTEM "../parent.xml">]>

and in parameter field just declare

&parent......it willl take care.

-JT

On Wednesday, May 29, 2013 9:59:13 AM UTC-4, JT_selenium wrote:
Hi Cedric,
Any solutions where i can describe common parameters in one xml and call that xml in another test suites?

I dont want to use <suite-files> tag as i need to repeat all parameters again in different xmls which i dont want.

Any help will be appreciate.....
thanks,
Jt

On Wednesday, May 29, 2013 1:07:25 AM UTC-4, Cédric Beust ♔ wrote:
You can include suites in each other with the <suite-files> tag.


-- 
Cédric



On Tue, May 28, 2013 at 7:34 PM, Krishnan Mahadevan <[hidden email]> wrote:
I wasnt aware that TestNG suite xmls can extend each other. 

Cedric,
Is this present in TestNG ?


On Wednesday, May 29, 2013, JT_selenium wrote:
Hi,
I have parent xml and different child xmls. I want to declare all parameters in parent xml and need to get available in child xml so that i dont need to keep same parameters in all xmls. Is there any way i can do this. I got some solution like below but its not working

<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" [<!ENTITY parent SYSTEM "../parent.xml">]>

where above line is declared in child.xml to call parameters from parent.xml but its not working or not able to link parameters. If there is any other solution to link different xmls please let me know.

thanks,
JT



--
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 testng-users+unsubscribe@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
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/

--
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 testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users?hl=en.
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: calling parameters from another xml

Krishnan Mahadevan
That's really interesting! Thanks for sharing this info. I never knew about this till now :)

On Wednesday, May 29, 2013, JT_selenium wrote:
Got the solution where xml parameters can be defined at one place and can be called in mulitple suite files so need to declare common parameters again. 

Declare like below: 
<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" [<!ENTITY parent SYSTEM "../parent.xml">]>

and in parameter field just declare

&parent......it willl take care.

-JT

On Wednesday, May 29, 2013 9:59:13 AM UTC-4, JT_selenium wrote:
Hi Cedric,
Any solutions where i can describe common parameters in one xml and call that xml in another test suites?

I dont want to use <suite-files> tag as i need to repeat all parameters again in different xmls which i dont want.

Any help will be appreciate.....
thanks,
Jt

On Wednesday, May 29, 2013 1:07:25 AM UTC-4, Cédric Beust ♔ wrote:
You can include suites in each other with the <suite-files> tag.


-- 
Cédric



On Tue, May 28, 2013 at 7:34 PM, Krishnan Mahadevan <[hidden email]> wrote:
I wasnt aware that TestNG suite xmls can extend each other. 

Cedric,
Is this present in TestNG ?


On Wednesday, May 29, 2013, JT_selenium wrote:
Hi,
I have parent xml and different child xmls. I want to declare all parameters in parent xml and need to get available in child xml so that i dont need to keep same parameters in all xmls. Is there any way i can do this. I got some solution like below but its not working

<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" [<!ENTITY parent SYSTEM "../parent.xml">]>

where above line is declared in child.xml to call parameters from parent.xml but its not working or not able to link parameters. If there is any other solution to link different xmls please let me know.

thanks,
JT



--
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 testng-users+unsubscribe@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
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/

--
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 testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users?hl=en.
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 <a href="javascript:_e({}, &#39;cvml&#39;, &#39;testng-users%2Bunsubscribe@googlegroups.com&#39;);" target="_blank">testng-users+unsubscribe@....
To post to this group, send email to <a href="javascript:_e({}, &#39;cvml&#39;, &#39;testng-users@googlegroups.com&#39;);" target="_blank">testng-users@....
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
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/

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: calling parameters from another xml

vamsee83
<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" [<!ENTITY parent SYSTEM "../parent.xml">]>
<parameters>&parent;</parameters>

Using above approach is broken with TestNG 10+. Anyone aware of it?

Below is the error we are getting now for "parameters" tag in xml

 org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 15; Element type "parameters" must be declared. 

On Wednesday, May 29, 2013 at 8:44:41 PM UTC-7, Krishnan wrote:
That's really interesting! Thanks for sharing this info. I never knew about this till now :)

On Wednesday, May 29, 2013, JT_selenium wrote:
Got the solution where xml parameters can be defined at one place and can be called in mulitple suite files so need to declare common parameters again. 

Declare like below: 
<!DOCTYPE suite SYSTEM "<a href="http://beust.com/testng/testng-1.0.dtd" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fbeust.com%2Ftestng%2Ftestng-1.0.dtd\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFfE95VpTEMCxZvBfpnK0F1L_8qXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fbeust.com%2Ftestng%2Ftestng-1.0.dtd\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFfE95VpTEMCxZvBfpnK0F1L_8qXg&#39;;return true;">http://beust.com/testng/testng-1.0.dtd" [<!ENTITY parent SYSTEM "../parent.xml">]>

and in parameter field just declare

&parent......it willl take care.

-JT

On Wednesday, May 29, 2013 9:59:13 AM UTC-4, JT_selenium wrote:
Hi Cedric,
Any solutions where i can describe common parameters in one xml and call that xml in another test suites?

I dont want to use <suite-files> tag as i need to repeat all parameters again in different xmls which i dont want.

Any help will be appreciate.....
thanks,
Jt

On Wednesday, May 29, 2013 1:07:25 AM UTC-4, Cédric Beust ♔ wrote:
You can include suites in each other with the <suite-files> tag.


-- 
Cédric



On Tue, May 28, 2013 at 7:34 PM, Krishnan Mahadevan <[hidden email]> wrote:
I wasnt aware that TestNG suite xmls can extend each other. 

Cedric,
Is this present in TestNG ?


On Wednesday, May 29, 2013, JT_selenium wrote:
Hi,
I have parent xml and different child xmls. I want to declare all parameters in parent xml and need to get available in child xml so that i dont need to keep same parameters in all xmls. Is there any way i can do this. I got some solution like below but its not working

<!DOCTYPE suite SYSTEM "<a href="http://beust.com/testng/testng-1.0.dtd" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fbeust.com%2Ftestng%2Ftestng-1.0.dtd\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFfE95VpTEMCxZvBfpnK0F1L_8qXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fbeust.com%2Ftestng%2Ftestng-1.0.dtd\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFfE95VpTEMCxZvBfpnK0F1L_8qXg&#39;;return true;">http://beust.com/testng/testng-1.0.dtd" [<!ENTITY parent SYSTEM "../parent.xml">]>

where above line is declared in child.xml to call parameters from parent.xml but its not working or not able to link parameters. If there is any other solution to link different xmls please let me know.

thanks,
JT



--
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 testng-users+unsubscribe@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="http://groups.google.com/group/testng-users?hl=en" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/testng-users?hl\x3den&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/testng-users?hl\x3den&#39;;return true;">http://groups.google.com/group/testng-users?hl=en.
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/groups/opt_out&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/groups/opt_out&#39;;return true;">https://groups.google.com/groups/opt_out.
 
 


--
Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.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 testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="http://groups.google.com/group/testng-users?hl=en" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/testng-users?hl\x3den&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/testng-users?hl\x3den&#39;;return true;">http://groups.google.com/group/testng-users?hl=en.
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/groups/opt_out&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/groups/opt_out&#39;;return true;">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 testng-users+unsubscribe@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="http://groups.google.com/group/testng-users?hl=en" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/testng-users?hl\x3den&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/testng-users?hl\x3den&#39;;return true;">http://groups.google.com/group/testng-users?hl=en.
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/groups/opt_out&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/groups/opt_out&#39;;return true;">https://groups.google.com/groups/opt_out.
 
 


--
Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.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 https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Loading...