TestNG RunTime Listener

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

TestNG RunTime Listener

Nael Abd eljawad
Hi, 

I've added a script that generates GIF files using JUnit, created  a listener that extends RunListener class and overrides testFinish function which adds screenshots in runtime.
I'm trying to do the same by TestNG but can't find the listener I need to extends instead of RunListener class in JUnit.
I tried to implement multiple listeners interfaces (ITestListener, IInvokedMethodListener, IExecutionListener...), but i'm not getting the same results as JUnit.

FYI, I'm using cucumber After hook to generate GIF and running my tests by Maven and added the listener to maven POM.xml. 
The problem that after running by maven the cucumber hook executed before the listener implemented functions but by JUnit it works as expected.

Can you help please?

Thanks

--
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: TestNG RunTime Listener

sesha v venkat
Hi Nael,

   I am also trying to find the same. Are you successful to find a listener for TestNg or any work around you found. Please share the information.

Thank You
Sesha

On Sunday, April 15, 2018 at 7:53:30 AM UTC-4, Nael Abd eljawad wrote:
Hi, 

I've added a script that generates GIF files using JUnit, created  a listener that extends RunListener class and overrides testFinish function which adds screenshots in runtime.
I'm trying to do the same by TestNG but can't find the listener I need to extends instead of RunListener class in JUnit.
I tried to implement multiple listeners interfaces (ITestListener, IInvokedMethodListener, IExecutionListener...), but i'm not getting the same results as JUnit.

FYI, I'm using cucumber After hook to generate GIF and running my tests by Maven and added the listener to maven POM.xml. 
The problem that after running by maven the cucumber hook executed before the listener implemented functions but by JUnit it works as expected.

Can you help please?

Thanks

--
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: TestNG RunTime Listener

David Genrich
In reply to this post by Nael Abd eljawad
For TestNG, my listener class looks like:

public class TestListener extends TestListenerAdaptor implements IInvokedMethodListener


--
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: TestNG RunTime Listener

sesha v venkat
Thanks David for response. I am converting my Cucumber-JUnit project to Cucumber-TestNg. Let me explain the scenario i am trying to replicate in TestNG which is similar to what Nael faced.
In Junit, I used RunListener to grab Gherkin steps under execution. I have this listener return me if i am executing 'Given' condition or 'When' or 'Then' so on.
But in TestNg i coud not find a listener that returns me the Gherkin scenario executing. I tried the listeners you mentioned, but i could not solve this problem. Suggest.

On Monday, January 28, 2019 at 4:32:17 PM UTC-5, David Genrich wrote:
For TestNG, my listener class looks like:

public class TestListener extends TestListenerAdaptor implements IInvokedMethodListener


--
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: TestNG RunTime Listener

sesha v venkat
Basically, what i am looking for is a current execution listener similar to RunListener. While in TestNg i find many at test level and not at line of execution.Suggest if not Listeners, then any other way i can replicate my Junit example in TestNg. Appreciate the help.


On Tuesday, January 29, 2019 at 9:34:43 AM UTC-5, Sesha Atkuru wrote:
Thanks David for response. I am converting my Cucumber-JUnit project to Cucumber-TestNg. Let me explain the scenario i am trying to replicate in TestNG which is similar to what Nael faced.
In Junit, I used RunListener to grab Gherkin steps under execution. I have this listener return me if i am executing 'Given' condition or 'When' or 'Then' so on.
But in TestNg i coud not find a listener that returns me the Gherkin scenario executing. I tried the listeners you mentioned, but i could not solve this problem. Suggest.

On Monday, January 28, 2019 at 4:32:17 PM UTC-5, David Genrich wrote:
For TestNG, my listener class looks like:

public class TestListener extends TestListenerAdaptor implements IInvokedMethodListener


--
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: TestNG RunTime Listener

⇜Krishnan Mahadevan⇝
Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.

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 Scribblings @ https://rationaleemotions.com/


On Tue, Jan 29, 2019 at 9:05 PM Sesha Atkuru <[hidden email]> wrote:
Basically, what i am looking for is a current execution listener similar to RunListener. While in TestNg i find many at test level and not at line of execution.Suggest if not Listeners, then any other way i can replicate my Junit example in TestNg. Appreciate the help.


On Tuesday, January 29, 2019 at 9:34:43 AM UTC-5, Sesha Atkuru wrote:
Thanks David for response. I am converting my Cucumber-JUnit project to Cucumber-TestNg. Let me explain the scenario i am trying to replicate in TestNG which is similar to what Nael faced.
In Junit, I used RunListener to grab Gherkin steps under execution. I have this listener return me if i am executing 'Given' condition or 'When' or 'Then' so on.
But in TestNg i coud not find a listener that returns me the Gherkin scenario executing. I tried the listeners you mentioned, but i could not solve this problem. Suggest.

On Monday, January 28, 2019 at 4:32:17 PM UTC-5, David Genrich wrote:
For TestNG, my listener class looks like:

public class TestListener extends TestListenerAdaptor implements IInvokedMethodListener


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

Re: TestNG RunTime Listener

sesha v venkat
My Cucumber Test Runner.java file. uses @Runwith(CustomJUnitListener.class) 

public class CustomJUnitListener extends RunListener {

  SeleniumTest test = null;

  public void setSeleniumTest(SeleniumTest test) {
    this.test = test;
  }

  /** {@inheritDoc} */
  @Override
  public void testFinished(Description description) throws Exception {
            // Get which scenario step under execution at run time..here 
           // description objec has execution gherkin step at run timwe. It tells which step is getting executed like: 'Given' or 'Then'   
  }

}```

On Tuesday, January 29, 2019 at 11:06:51 PM UTC-5, Krishnan Mahadevan wrote:
Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.

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/
My Technical Scribblings @ <a href="https://rationaleemotions.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;">https://rationaleemotions.com/


On Tue, Jan 29, 2019 at 9:05 PM Sesha Atkuru <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="tPvVbQiTDgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ses...@...> wrote:
Basically, what i am looking for is a current execution listener similar to RunListener. While in TestNg i find many at test level and not at line of execution.Suggest if not Listeners, then any other way i can replicate my Junit example in TestNg. Appreciate the help.


On Tuesday, January 29, 2019 at 9:34:43 AM UTC-5, Sesha Atkuru wrote:
Thanks David for response. I am converting my Cucumber-JUnit project to Cucumber-TestNg. Let me explain the scenario i am trying to replicate in TestNG which is similar to what Nael faced.
In Junit, I used RunListener to grab Gherkin steps under execution. I have this listener return me if i am executing 'Given' condition or 'When' or 'Then' so on.
But in TestNg i coud not find a listener that returns me the Gherkin scenario executing. I tried the listeners you mentioned, but i could not solve this problem. Suggest.

On Monday, January 28, 2019 at 4:32:17 PM UTC-5, David Genrich wrote:
For TestNG, my listener class looks like:

public class TestListener extends TestListenerAdaptor implements IInvokedMethodListener


--
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="tPvVbQiTDgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="tPvVbQiTDgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="https://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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.
Reply | Threaded
Open this post in threaded view
|

Re: TestNG RunTime Listener

sesha v venkat
In reply to this post by ⇜Krishnan Mahadevan⇝
I am looking for similar run time listener in TestNg that can give me which gherkin step gets executed at run time.
Please suggest. Thank you

On Tuesday, January 29, 2019 at 11:06:51 PM UTC-5, Krishnan Mahadevan wrote:
Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.

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/
My Technical Scribblings @ <a href="https://rationaleemotions.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;">https://rationaleemotions.com/


On Tue, Jan 29, 2019 at 9:05 PM Sesha Atkuru <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="tPvVbQiTDgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ses...@...> wrote:
Basically, what i am looking for is a current execution listener similar to RunListener. While in TestNg i find many at test level and not at line of execution.Suggest if not Listeners, then any other way i can replicate my Junit example in TestNg. Appreciate the help.


On Tuesday, January 29, 2019 at 9:34:43 AM UTC-5, Sesha Atkuru wrote:
Thanks David for response. I am converting my Cucumber-JUnit project to Cucumber-TestNg. Let me explain the scenario i am trying to replicate in TestNG which is similar to what Nael faced.
In Junit, I used RunListener to grab Gherkin steps under execution. I have this listener return me if i am executing 'Given' condition or 'When' or 'Then' so on.
But in TestNg i coud not find a listener that returns me the Gherkin scenario executing. I tried the listeners you mentioned, but i could not solve this problem. Suggest.

On Monday, January 28, 2019 at 4:32:17 PM UTC-5, David Genrich wrote:
For TestNG, my listener class looks like:

public class TestListener extends TestListenerAdaptor implements IInvokedMethodListener


--
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="tPvVbQiTDgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="tPvVbQiTDgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="https://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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.
Reply | Threaded
Open this post in threaded view
|

Re: TestNG RunTime Listener

⇜Krishnan Mahadevan⇝
Sesha,

I repeat my previously asked question. I am part of the TestNG dev and I would like to help you get this sorted out. But without a sample project, its going to be hard for me to do that.

>>>> Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.


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 Scribblings @ https://rationaleemotions.com/


On Fri, Feb 1, 2019 at 9:16 AM Sesha Atkuru <[hidden email]> wrote:
I am looking for similar run time listener in TestNg that can give me which gherkin step gets executed at run time.
Please suggest. Thank you

On Tuesday, January 29, 2019 at 11:06:51 PM UTC-5, Krishnan Mahadevan wrote:
Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.

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 Scribblings @ https://rationaleemotions.com/


On Tue, Jan 29, 2019 at 9:05 PM Sesha Atkuru <[hidden email]> wrote:
Basically, what i am looking for is a current execution listener similar to RunListener. While in TestNg i find many at test level and not at line of execution.Suggest if not Listeners, then any other way i can replicate my Junit example in TestNg. Appreciate the help.


On Tuesday, January 29, 2019 at 9:34:43 AM UTC-5, Sesha Atkuru wrote:
Thanks David for response. I am converting my Cucumber-JUnit project to Cucumber-TestNg. Let me explain the scenario i am trying to replicate in TestNG which is similar to what Nael faced.
In Junit, I used RunListener to grab Gherkin steps under execution. I have this listener return me if i am executing 'Given' condition or 'When' or 'Then' so on.
But in TestNg i coud not find a listener that returns me the Gherkin scenario executing. I tried the listeners you mentioned, but i could not solve this problem. Suggest.

On Monday, January 28, 2019 at 4:32:17 PM UTC-5, David Genrich wrote:
For TestNG, my listener class looks like:

public class TestListener extends TestListenerAdaptor implements IInvokedMethodListener


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

--
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: TestNG RunTime Listener

sesha v venkat
Hi Krishnan,
  
   Take a look at this video, this is exactly what i implemented to check which step getting executed.  I like to get this done in TestNg now. Suggest

https://www.youtube.com/watch?v=iudFtypIMF0



On Thursday, January 31, 2019 at 11:17:21 PM UTC-5, Krishnan Mahadevan wrote:
Sesha,

I repeat my previously asked question. I am part of the TestNG dev and I would like to help you get this sorted out. But without a sample project, its going to be hard for me to do that.

>>>> Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.


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/
My Technical Scribblings @ <a href="https://rationaleemotions.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;">https://rationaleemotions.com/


On Fri, Feb 1, 2019 at 9:16 AM Sesha Atkuru <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="G4Z8e0y-FgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ses...@...> wrote:
I am looking for similar run time listener in TestNg that can give me which gherkin step gets executed at run time.
Please suggest. Thank you

On Tuesday, January 29, 2019 at 11:06:51 PM UTC-5, Krishnan Mahadevan wrote:
Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.

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/" rel="nofollow" target="_blank" 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/
My Technical Scribblings @ <a href="https://rationaleemotions.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;">https://rationaleemotions.com/


On Tue, Jan 29, 2019 at 9:05 PM Sesha Atkuru <[hidden email]> wrote:
Basically, what i am looking for is a current execution listener similar to RunListener. While in TestNg i find many at test level and not at line of execution.Suggest if not Listeners, then any other way i can replicate my Junit example in TestNg. Appreciate the help.


On Tuesday, January 29, 2019 at 9:34:43 AM UTC-5, Sesha Atkuru wrote:
Thanks David for response. I am converting my Cucumber-JUnit project to Cucumber-TestNg. Let me explain the scenario i am trying to replicate in TestNG which is similar to what Nael faced.
In Junit, I used RunListener to grab Gherkin steps under execution. I have this listener return me if i am executing 'Given' condition or 'When' or 'Then' so on.
But in TestNg i coud not find a listener that returns me the Gherkin scenario executing. I tried the listeners you mentioned, but i could not solve this problem. Suggest.

On Monday, January 28, 2019 at 4:32:17 PM UTC-5, David Genrich wrote:
For TestNG, my listener class looks like:

public class TestListener extends TestListenerAdaptor implements IInvokedMethodListener


--
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="https://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="G4Z8e0y-FgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="G4Z8e0y-FgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="https://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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.
Reply | Threaded
Open this post in threaded view
|

Re: TestNG RunTime Listener

⇜Krishnan Mahadevan⇝
Thanks for the video, but what about that sample that I been asking for :)
Its a lot more easier for me if you can share a sample. That way, all I would need to do is, to change it accordingly and share back the same project.



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 Scribblings @ https://rationaleemotions.com/


On Sun, Feb 3, 2019 at 9:30 AM Sesha Atkuru <[hidden email]> wrote:
Hi Krishnan,
  
   Take a look at this video, this is exactly what i implemented to check which step getting executed.  I like to get this done in TestNg now. Suggest




On Thursday, January 31, 2019 at 11:17:21 PM UTC-5, Krishnan Mahadevan wrote:
Sesha,

I repeat my previously asked question. I am part of the TestNG dev and I would like to help you get this sorted out. But without a sample project, its going to be hard for me to do that.

>>>> Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.


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 Scribblings @ https://rationaleemotions.com/


On Fri, Feb 1, 2019 at 9:16 AM Sesha Atkuru <[hidden email]> wrote:
I am looking for similar run time listener in TestNg that can give me which gherkin step gets executed at run time.
Please suggest. Thank you

On Tuesday, January 29, 2019 at 11:06:51 PM UTC-5, Krishnan Mahadevan wrote:
Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.

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 Scribblings @ https://rationaleemotions.com/


On Tue, Jan 29, 2019 at 9:05 PM Sesha Atkuru <[hidden email]> wrote:
Basically, what i am looking for is a current execution listener similar to RunListener. While in TestNg i find many at test level and not at line of execution.Suggest if not Listeners, then any other way i can replicate my Junit example in TestNg. Appreciate the help.


On Tuesday, January 29, 2019 at 9:34:43 AM UTC-5, Sesha Atkuru wrote:
Thanks David for response. I am converting my Cucumber-JUnit project to Cucumber-TestNg. Let me explain the scenario i am trying to replicate in TestNG which is similar to what Nael faced.
In Junit, I used RunListener to grab Gherkin steps under execution. I have this listener return me if i am executing 'Given' condition or 'When' or 'Then' so on.
But in TestNg i coud not find a listener that returns me the Gherkin scenario executing. I tried the listeners you mentioned, but i could not solve this problem. Suggest.

On Monday, January 28, 2019 at 4:32:17 PM UTC-5, David Genrich wrote:
For TestNG, my listener class looks like:

public class TestListener extends TestListenerAdaptor implements IInvokedMethodListener


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

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

Re: TestNG RunTime Listener

sesha v venkat
Hi Krishnan,

  Please find the example here:  https://github.com/SeshaAtkuru/JunitCustomListener.git
Suggest.

Thank you
Sesha Atkuru


On Saturday, February 2, 2019 at 11:39:35 PM UTC-5, Krishnan Mahadevan wrote:
Thanks for the video, but what about that sample that I been asking for :)
Its a lot more easier for me if you can share a sample. That way, all I would need to do is, to change it accordingly and share back the same project.



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/
My Technical Scribblings @ <a href="https://rationaleemotions.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;">https://rationaleemotions.com/


On Sun, Feb 3, 2019 at 9:30 AM Sesha Atkuru <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="mq4RQaxcFwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ses...@...> wrote:
Hi Krishnan,
  
   Take a look at this video, this is exactly what i implemented to check which step getting executed.  I like to get this done in TestNg now. Suggest

<a href="https://www.youtube.com/watch?v=iudFtypIMF0" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.youtube.com/watch?v\x3diudFtypIMF0&#39;;return true;" onclick="this.href=&#39;https://www.youtube.com/watch?v\x3diudFtypIMF0&#39;;return true;">https://www.youtube.com/watch?v=iudFtypIMF0



On Thursday, January 31, 2019 at 11:17:21 PM UTC-5, Krishnan Mahadevan wrote:
Sesha,

I repeat my previously asked question. I am part of the TestNG dev and I would like to help you get this sorted out. But without a sample project, its going to be hard for me to do that.

>>>> Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.


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/" rel="nofollow" target="_blank" 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/
My Technical Scribblings @ <a href="https://rationaleemotions.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;">https://rationaleemotions.com/


On Fri, Feb 1, 2019 at 9:16 AM Sesha Atkuru <[hidden email]> wrote:
I am looking for similar run time listener in TestNg that can give me which gherkin step gets executed at run time.
Please suggest. Thank you

On Tuesday, January 29, 2019 at 11:06:51 PM UTC-5, Krishnan Mahadevan wrote:
Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.

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/" rel="nofollow" target="_blank" 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/
My Technical Scribblings @ <a href="https://rationaleemotions.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;">https://rationaleemotions.com/


On Tue, Jan 29, 2019 at 9:05 PM Sesha Atkuru <[hidden email]> wrote:
Basically, what i am looking for is a current execution listener similar to RunListener. While in TestNg i find many at test level and not at line of execution.Suggest if not Listeners, then any other way i can replicate my Junit example in TestNg. Appreciate the help.


On Tuesday, January 29, 2019 at 9:34:43 AM UTC-5, Sesha Atkuru wrote:
Thanks David for response. I am converting my Cucumber-JUnit project to Cucumber-TestNg. Let me explain the scenario i am trying to replicate in TestNG which is similar to what Nael faced.
In Junit, I used RunListener to grab Gherkin steps under execution. I have this listener return me if i am executing 'Given' condition or 'When' or 'Then' so on.
But in TestNg i coud not find a listener that returns me the Gherkin scenario executing. I tried the listeners you mentioned, but i could not solve this problem. Suggest.

On Monday, January 28, 2019 at 4:32:17 PM UTC-5, David Genrich wrote:
For TestNG, my listener class looks like:

public class TestListener extends TestListenerAdaptor implements IInvokedMethodListener


--
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="https://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="https://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="mq4RQaxcFwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="mq4RQaxcFwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="https://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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.
Reply | Threaded
Open this post in threaded view
|

Re: TestNG RunTime Listener

sesha v venkat
Hi Krishnan,
  Are you able to access git repo, let me know if you have any update son this.
Thanks
Sesha

On Thursday, February 7, 2019 at 11:45:31 PM UTC-5, Sesha Atkuru wrote:
Hi Krishnan,

  Please find the example here:  <a href="https://github.com/SeshaAtkuru/JunitCustomListener.git" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSeshaAtkuru%2FJunitCustomListener.git\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHgsE9XTCO0SE-ZkuKDnwEeiqeh7Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSeshaAtkuru%2FJunitCustomListener.git\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHgsE9XTCO0SE-ZkuKDnwEeiqeh7Q&#39;;return true;">https://github.com/SeshaAtkuru/JunitCustomListener.git
Suggest.

Thank you
Sesha Atkuru


On Saturday, February 2, 2019 at 11:39:35 PM UTC-5, Krishnan Mahadevan wrote:
Thanks for the video, but what about that sample that I been asking for :)
Its a lot more easier for me if you can share a sample. That way, all I would need to do is, to change it accordingly and share back the same project.



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/" rel="nofollow" target="_blank" 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/
My Technical Scribblings @ <a href="https://rationaleemotions.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;">https://rationaleemotions.com/


On Sun, Feb 3, 2019 at 9:30 AM Sesha Atkuru <[hidden email]> wrote:
Hi Krishnan,
  
   Take a look at this video, this is exactly what i implemented to check which step getting executed.  I like to get this done in TestNg now. Suggest

<a href="https://www.youtube.com/watch?v=iudFtypIMF0" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.youtube.com/watch?v\x3diudFtypIMF0&#39;;return true;" onclick="this.href=&#39;https://www.youtube.com/watch?v\x3diudFtypIMF0&#39;;return true;">https://www.youtube.com/watch?v=iudFtypIMF0



On Thursday, January 31, 2019 at 11:17:21 PM UTC-5, Krishnan Mahadevan wrote:
Sesha,

I repeat my previously asked question. I am part of the TestNG dev and I would like to help you get this sorted out. But without a sample project, its going to be hard for me to do that.

>>>> Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.


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/" rel="nofollow" target="_blank" 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/
My Technical Scribblings @ <a href="https://rationaleemotions.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;">https://rationaleemotions.com/


On Fri, Feb 1, 2019 at 9:16 AM Sesha Atkuru <[hidden email]> wrote:
I am looking for similar run time listener in TestNg that can give me which gherkin step gets executed at run time.
Please suggest. Thank you

On Tuesday, January 29, 2019 at 11:06:51 PM UTC-5, Krishnan Mahadevan wrote:
Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.

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/" rel="nofollow" target="_blank" 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/
My Technical Scribblings @ <a href="https://rationaleemotions.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frationaleemotions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTZZAyb1XtvO9WYUkXhDYXKYrdAQ&#39;;return true;">https://rationaleemotions.com/


On Tue, Jan 29, 2019 at 9:05 PM Sesha Atkuru <[hidden email]> wrote:
Basically, what i am looking for is a current execution listener similar to RunListener. While in TestNg i find many at test level and not at line of execution.Suggest if not Listeners, then any other way i can replicate my Junit example in TestNg. Appreciate the help.


On Tuesday, January 29, 2019 at 9:34:43 AM UTC-5, Sesha Atkuru wrote:
Thanks David for response. I am converting my Cucumber-JUnit project to Cucumber-TestNg. Let me explain the scenario i am trying to replicate in TestNG which is similar to what Nael faced.
In Junit, I used RunListener to grab Gherkin steps under execution. I have this listener return me if i am executing 'Given' condition or 'When' or 'Then' so on.
But in TestNg i coud not find a listener that returns me the Gherkin scenario executing. I tried the listeners you mentioned, but i could not solve this problem. Suggest.

On Monday, January 28, 2019 at 4:32:17 PM UTC-5, David Genrich wrote:
For TestNG, my listener class looks like:

public class TestListener extends TestListenerAdaptor implements IInvokedMethodListener


--
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="https://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="https://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="https://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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.
Reply | Threaded
Open this post in threaded view
|

Re: TestNG RunTime Listener

⇜Krishnan Mahadevan⇝
Its a straight forward case of you just building your own plugin and then wiring it into the @CucumberOptions annotation that you have added into your "cucumber.examples.java.calculator.RunCukesTestNGTest" class.

To learn how to build your own plugin, take a look at the implementation of cucumber.runtime.formatter.JSONFormatter.
That should help you understand how to go about doing this.

Once your plugin has been created and configured to tap into any events that you want [ For e.g., scenario started, scenario ended, executing test step etc.,], you would just need to wire in your plugin via the "plugin" attribute of the CucumberOptions annotation.

There's nothing extra that is required from TestNG on this.

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 Scribblings @ https://rationaleemotions.com/


On Tue, Feb 12, 2019 at 3:53 AM Sesha Atkuru <[hidden email]> wrote:
Hi Krishnan,
  Are you able to access git repo, let me know if you have any update son this.
Thanks
Sesha

On Thursday, February 7, 2019 at 11:45:31 PM UTC-5, Sesha Atkuru wrote:
Hi Krishnan,

  Please find the example here:  https://github.com/SeshaAtkuru/JunitCustomListener.git
Suggest.

Thank you
Sesha Atkuru


On Saturday, February 2, 2019 at 11:39:35 PM UTC-5, Krishnan Mahadevan wrote:
Thanks for the video, but what about that sample that I been asking for :)
Its a lot more easier for me if you can share a sample. That way, all I would need to do is, to change it accordingly and share back the same project.



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 Scribblings @ https://rationaleemotions.com/


On Sun, Feb 3, 2019 at 9:30 AM Sesha Atkuru <[hidden email]> wrote:
Hi Krishnan,
  
   Take a look at this video, this is exactly what i implemented to check which step getting executed.  I like to get this done in TestNg now. Suggest




On Thursday, January 31, 2019 at 11:17:21 PM UTC-5, Krishnan Mahadevan wrote:
Sesha,

I repeat my previously asked question. I am part of the TestNG dev and I would like to help you get this sorted out. But without a sample project, its going to be hard for me to do that.

>>>> Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.


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 Scribblings @ https://rationaleemotions.com/


On Fri, Feb 1, 2019 at 9:16 AM Sesha Atkuru <[hidden email]> wrote:
I am looking for similar run time listener in TestNg that can give me which gherkin step gets executed at run time.
Please suggest. Thank you

On Tuesday, January 29, 2019 at 11:06:51 PM UTC-5, Krishnan Mahadevan wrote:
Can you please help share a sample project of you making use of JUnit TestListener to achieve whatever you are looking for? That way it would give me an idea of what is it that you need in TestNG. Please feel free to share a sample project itself. That way its easier for me to just run it and see what you are expecting.

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 Scribblings @ https://rationaleemotions.com/


On Tue, Jan 29, 2019 at 9:05 PM Sesha Atkuru <[hidden email]> wrote:
Basically, what i am looking for is a current execution listener similar to RunListener. While in TestNg i find many at test level and not at line of execution.Suggest if not Listeners, then any other way i can replicate my Junit example in TestNg. Appreciate the help.


On Tuesday, January 29, 2019 at 9:34:43 AM UTC-5, Sesha Atkuru wrote:
Thanks David for response. I am converting my Cucumber-JUnit project to Cucumber-TestNg. Let me explain the scenario i am trying to replicate in TestNG which is similar to what Nael faced.
In Junit, I used RunListener to grab Gherkin steps under execution. I have this listener return me if i am executing 'Given' condition or 'When' or 'Then' so on.
But in TestNg i coud not find a listener that returns me the Gherkin scenario executing. I tried the listeners you mentioned, but i could not solve this problem. Suggest.

On Monday, January 28, 2019 at 4:32:17 PM UTC-5, David Genrich wrote:
For TestNG, my listener class looks like:

public class TestListener extends TestListenerAdaptor implements IInvokedMethodListener


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

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

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