How to achieve running a single iteration and ignore other iterations in an Unrolled Test case

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

How to achieve running a single iteration and ignore other iterations in an Unrolled Test case

Subrahmanyam Rentala
How to achieve running a single iteration and ignore other iterations in an Unrolled Test case 

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" 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/spockframework.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to achieve running a single iteration and ignore other iterations in an Unrolled Test case

Kostis Kapelonis
May I ask, why do you want that?

What are you trying to accomplish?

On Mon, Oct 12, 2015 at 8:27 AM, Subrahmanyam Rentala
<[hidden email]> wrote:

> How to achieve running a single iteration and ignore other iterations in an
> Unrolled Test case
>
> --
> You received this message because you are subscribed to the Google Groups
> "Spock Framework - User" 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/spockframework.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" 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/spockframework.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to achieve running a single iteration and ignore other iterations in an Unrolled Test case

Subrahmanyam Rentala
Hi Kostis, 

I have a UnRolled Test case which has 5 iterations. When I run them 3 gets passed and 2 gets failed.
We are putting these failed test cases in an xml and re-running only those.

When we do this it executes the 2 failed test cases but in the JUNIT reports it shows rest 3 as ignored.
But I want them not to be shown at all in the reports as ignored. (Please look at the attached screenshot)

Is there way I can do that ?

Thanks,
Subrahmanyam

On Monday, 12 October 2015 13:43:04 UTC+5:30, Kostis Kapelonis wrote:
May I ask, why do you want that?

What are you trying to accomplish?

On Mon, Oct 12, 2015 at 8:27 AM, Subrahmanyam Rentala
<<a href="javascript:" target="_blank" gdf-obfuscated-mailto="XeDc31YcCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">gibral...@...> wrote:

> How to achieve running a single iteration and ignore other iterations in an
> Unrolled Test case
>
> --
> You received this message because you are subscribed to the Google Groups
> "Spock Framework - User" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="XeDc31YcCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">spockframewor...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="XeDc31YcCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">spockfr...@googlegroups.com.
> Visit this group at <a href="http://groups.google.com/group/spockframework" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/spockframework&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/spockframework&#39;;return true;">http://groups.google.com/group/spockframework.
> 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 "Spock Framework - User" 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/spockframework.
For more options, visit https://groups.google.com/d/optout.

sshot.png (22K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to achieve running a single iteration and ignore other iterations in an Unrolled Test case

Subrahmanyam Rentala
In reply to this post by Kostis Kapelonis
Basically I want to know if there is a way where I can specify to run only these iterations and not the other ones ?



On Monday, 12 October 2015 13:43:04 UTC+5:30, Kostis Kapelonis wrote:
May I ask, why do you want that?

What are you trying to accomplish?

On Mon, Oct 12, 2015 at 8:27 AM, Subrahmanyam Rentala
<<a href="javascript:" target="_blank" gdf-obfuscated-mailto="XeDc31YcCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">gibral...@...> wrote:

> How to achieve running a single iteration and ignore other iterations in an
> Unrolled Test case
>
> --
> You received this message because you are subscribed to the Google Groups
> "Spock Framework - User" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="XeDc31YcCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">spockframewor...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="XeDc31YcCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">spockfr...@googlegroups.com.
> Visit this group at <a href="http://groups.google.com/group/spockframework" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/spockframework&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/spockframework&#39;;return true;">http://groups.google.com/group/spockframework.
> 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 "Spock Framework - User" 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/spockframework.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to achieve running a single iteration and ignore other iterations in an Unrolled Test case

Kostis Kapelonis
Hello

It is not clear to me what you mean by "We are putting these failed
test cases in an xml and re-running only those".
What kind of XML is that? What does it contain? Who runs/reads this
xml? Is this a manual or an automatic step?

But to answer your second question.
I am not aware of any way to run with vanilla Spock only some
iterations. And even it if it did exist such thing I am not sure if it
is a good idea.

Let's say that you have an unrolled test with 1000 cases.
You run the test and case 993 breaks. According to your process you
fix the code and run case 993 again and it passes.
But how do you know that case 356 or case 785 are still ok? You don't.

Thus you need to run all cases again anyway. (and have them all in the
full report)

Kostis

On Mon, Oct 12, 2015 at 1:46 PM, Subrahmanyam Rentala
<[hidden email]> wrote:

> Basically I want to know if there is a way where I can specify to run only
> these iterations and not the other ones ?
>
>
>
> On Monday, 12 October 2015 13:43:04 UTC+5:30, Kostis Kapelonis wrote:
>>
>> May I ask, why do you want that?
>>
>> What are you trying to accomplish?
>>
>> On Mon, Oct 12, 2015 at 8:27 AM, Subrahmanyam Rentala
>> <[hidden email]> wrote:
>> > How to achieve running a single iteration and ignore other iterations in
>> > an
>> > Unrolled Test case
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Spock Framework - User" 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/spockframework.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Spock Framework - User" 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/spockframework.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" 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/spockframework.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to achieve running a single iteration and ignore other iterations in an Unrolled Test case

Subrahmanyam Rentala
Hi, 

Its an automation setup. Lets say we have a test case with 1000 unrolled cases. When we run these 100 cases and lets say due to network problems 25 cases fail.
Even though our scripts and the application is correct and fine, we immediately wanted to re-run these failed cases(first run and second run are automated and will run serially one after the other.)
In the case of the first run , whenever a test case fails we are having a FailureListener, which captures the test case name and dumping it in the xml.
Before the execution of the second run it reads this xml and while visiting each Spec, it checks that if the method in that spec is also present in the xml. If yes then it executes that particular method or else it will set that test case as excluded.

This mechanism works fine with non unrolled cases.

With unrolled cases when a test case fails we are putting the main failed test case name and also the failed iteration name.
This way it executes only those iterations which are there in the xml.

Now the issue is even though it does not execute the rest of the iterations, it shows in the report as passed.
What I want is, that if I can tell spock to exclude even reporting that passed iteration.



On Monday, 12 October 2015 17:36:49 UTC+5:30, Kostis Kapelonis wrote:
Hello

It is not clear to me what you mean by "We are putting these failed
test cases in an xml and re-running only those".
What kind of XML is that? What does it contain? Who runs/reads this
xml? Is this a manual or an automatic step?

But to answer your second question.
I am not aware of any way to run with vanilla Spock only some
iterations. And even it if it did exist such thing I am not sure if it
is a good idea.

Let's say that you have an unrolled test with 1000 cases.
You run the test and case 993 breaks. According to your process you
fix the code and run case 993 again and it passes.
But how do you know that case 356 or case 785 are still ok? You don't.

Thus you need to run all cases again anyway. (and have them all in the
full report)

Kostis

On Mon, Oct 12, 2015 at 1:46 PM, Subrahmanyam Rentala
<<a href="javascript:" target="_blank" gdf-obfuscated-mailto="YBIQQBgpCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">gibral...@...> wrote:

> Basically I want to know if there is a way where I can specify to run only
> these iterations and not the other ones ?
>
>
>
> On Monday, 12 October 2015 13:43:04 UTC+5:30, Kostis Kapelonis wrote:
>>
>> May I ask, why do you want that?
>>
>> What are you trying to accomplish?
>>
>> On Mon, Oct 12, 2015 at 8:27 AM, Subrahmanyam Rentala
>> <[hidden email]> wrote:
>> > How to achieve running a single iteration and ignore other iterations in
>> > an
>> > Unrolled Test case
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Spock Framework - User" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to spockframewor...@googlegroups.com.
>> > To post to this group, send email to [hidden email].
>> > Visit this group at <a href="http://groups.google.com/group/spockframework" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/spockframework&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/spockframework&#39;;return true;">http://groups.google.com/group/spockframework.
>> > 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
> "Spock Framework - User" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="YBIQQBgpCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">spockframewor...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="YBIQQBgpCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">spockfr...@googlegroups.com.
> Visit this group at <a href="http://groups.google.com/group/spockframework" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/spockframework&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/spockframework&#39;;return true;">http://groups.google.com/group/spockframework.
> 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 "Spock Framework - User" 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/spockframework.
For more options, visit https://groups.google.com/d/optout.
Loading...