Is there a way to get IConfiguration object in ITestRunnerFactory which can be passed to a custom TestRunner in TestNG 6.8?

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

Is there a way to get IConfiguration object in ITestRunnerFactory which can be passed to a custom TestRunner in TestNG 6.8?

Tim Kuo

I am implementing the ITestRunnerFactory interface in TestNG 6.8 whose newTestRunner method returns me a TestRunner , I want to have specific test runners so am extending TestRunner class . Now the constructor of TestRunner class demands IConfiguration object passed to it . Is there a way to get the IConfiguration object in my implementation of ITestRunnerFactory so that i can pass it to constructor of my Custom TestRunner ? .

Most of the examples that i saw o the net are prior to TestNG 6.8 ( mostly 5.x) , where the signature of TestRunner constructor wasn't having the IConfiguration object .Hence any links illustrating the usage would also prove helpful .

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

Re: Is there a way to get IConfiguration object in ITestRunnerFactory which can be passed to a custom TestRunner in TestNG 6.8?

Francisco González

I've got exactly the same problem. Did you resolve it yet?

Thank you.

El jueves, 30 de mayo de 2013 00:01:51 UTC+2, Tim Kuo escribió:

I am implementing the ITestRunnerFactory interface in TestNG 6.8 whose newTestRunner method returns me a TestRunner , I want to have specific test runners so am extending TestRunner class . Now the constructor of TestRunner class demands IConfiguration object passed to it . Is there a way to get the IConfiguration object in my implementation of ITestRunnerFactory so that i can pass it to constructor of my Custom TestRunner ? .

Most of the examples that i saw o the net are prior to TestNG 6.8 ( mostly 5.x) , where the signature of TestRunner constructor wasn't having the IConfiguration object .Hence any links illustrating the usage would also prove helpful .

--
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: Is there a way to get IConfiguration object in ITestRunnerFactory which can be passed to a custom TestRunner in TestNG 6.8?

Krishnan Mahadevan
why not pass an instance of org.testng.internal.Configuration [ This public class implements the IConfiguration interface].

Even TestNG merely instantiates this class

m_configuration = new Configuration();


and then later packs in the required values via the setters.

    m_configuration.setAnnotationFinder(new JDK15AnnotationFinder(getAnnotationTransformer()));

    m_configuration.setHookable(m_hookable);

    m_configuration.setConfigurable(m_configurable);

    m_configuration.setObjectFactory(factory);

Would that help ?



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/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/


On Mon, Feb 17, 2014 at 1:56 PM, Francisco González <[hidden email]> wrote:

I've got exactly the same problem. Did you resolve it yet?

Thank you.

El jueves, 30 de mayo de 2013 00:01:51 UTC+2, Tim Kuo escribió:

I am implementing the ITestRunnerFactory interface in TestNG 6.8 whose newTestRunner method returns me a TestRunner , I want to have specific test runners so am extending TestRunner class . Now the constructor of TestRunner class demands IConfiguration object passed to it . Is there a way to get the IConfiguration object in my implementation of ITestRunnerFactory so that i can pass it to constructor of my Custom TestRunner ? .

Most of the examples that i saw o the net are prior to TestNG 6.8 ( mostly 5.x) , where the signature of TestRunner constructor wasn't having the IConfiguration object .Hence any links illustrating the usage would also prove helpful .

--
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: Is there a way to get IConfiguration object in ITestRunnerFactory which can be passed to a custom TestRunner in TestNG 6.8?

Samuel Yang
In reply to this post by Francisco González
Have you resolved this issue, I am hitting it

On Monday, February 17, 2014 at 12:26:08 AM UTC-8, Francisco González wrote:

I've got exactly the same problem. Did you resolve it yet?

Thank you.

El jueves, 30 de mayo de 2013 00:01:51 UTC+2, Tim Kuo escribió:

I am implementing the ITestRunnerFactory interface in TestNG 6.8 whose newTestRunner method returns me a TestRunner , I want to have specific test runners so am extending TestRunner class . Now the constructor of TestRunner class demands IConfiguration object passed to it . Is there a way to get the IConfiguration object in my implementation of ITestRunnerFactory so that i can pass it to constructor of my Custom TestRunner ? .

Most of the examples that i saw o the net are prior to TestNG 6.8 ( mostly 5.x) , where the signature of TestRunner constructor wasn't having the IConfiguration object .Hence any links illustrating the usage would also prove helpful .

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to get IConfiguration object in ITestRunnerFactory which can be passed to a custom TestRunner in TestNG 6.8?

Krishnan Mahadevan

Samuel,

 

Did you try my suggestion in this thread ? You can instantiate a org.testng.internal.Configuration#Configuration() via its default constructor and then pass it on to the TestRunner. That should suffice.

 

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/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Samuel Yang <[hidden email]>
Reply-To: <[hidden email]>
Date: Thursday, July 27, 2017 at 11:02 PM
To: testng-users <[hidden email]>
Subject: [testng-users] Re: Is there a way to get IConfiguration object in ITestRunnerFactory which can be passed to a custom TestRunner in TestNG 6.8?

 

Have you resolved this issue, I am hitting it

On Monday, February 17, 2014 at 12:26:08 AM UTC-8, Francisco González wrote:

I've got exactly the same problem. Did you resolve it yet?

Thank you.

El jueves, 30 de mayo de 2013 00:01:51 UTC+2, Tim Kuo escribió:

I am implementing the ITestRunnerFactory interface in TestNG 6.8 whose newTestRunner method returns me a TestRunner , I want to have specific test runners so am extending TestRunner class . Now the constructor of TestRunner class demands IConfiguration object passed to it . Is there a way to get the IConfiguration object in my implementation of ITestRunnerFactory so that i can pass it to constructor of my Custom TestRunner ? .

Most of the examples that i saw o the net are prior to TestNG 6.8 ( mostly 5.x) , where the signature of TestRunner constructor wasn't having the IConfiguration object .Hence any links illustrating the usage would also prove helpful .

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

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