Ignore specific iterations of spock test?

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

Ignore specific iterations of spock test?

Asif Ameer
Hi,

Is there a way to ignore a specific iteration without having to comment out the data row?
This would be useful in cases where one particular data iteration is failing in current release and is to be fixed in the next...so we mark the failing test (which has a bug) as ignored with the bug ID as a comment just like for a full method.
Is there any existing solution for the above?

Many thanks,
Asif

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/UQEJfnyNoYAJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Ignore specific iterations of spock test?

Peter Niederwieser
Administrator
This isn't something that's supported out-of-the-box. If you are willing to dig into the extension SPI, you should be able to achieve this with a Spock extension that registers an iteration interceptor on org.spockframework.runtime.model.FeatureInfo.

Cheers,
Peter

On Dec 7, 2012, at 6:35 PM, Asif Ameer <[hidden email]> wrote:

Hi,

Is there a way to ignore a specific iteration without having to comment out the data row?
This would be useful in cases where one particular data iteration is failing in current release and is to be fixed in the next...so we mark the failing test (which has a bug) as ignored with the bug ID as a comment just like for a full method.
Is there any existing solution for the above?

Many thanks,
Asif

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/UQEJfnyNoYAJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Ignore specific iterations of spock test?

Asif Ameer
Thank you. I will look into it.

On Friday, December 7, 2012 2:12:36 PM UTC-5, Peter Niederwieser wrote:
This isn't something that's supported out-of-the-box. If you are willing to dig into the extension SPI, you should be able to achieve this with a Spock extension that registers an iteration interceptor on org.spockframework.runtime.model.FeatureInfo.

Cheers,
Peter

On Dec 7, 2012, at 6:35 PM, Asif Ameer <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="sVBbmmMd9DwJ">asif...@...> wrote:

Hi,

Is there a way to ignore a specific iteration without having to comment out the data row?
This would be useful in cases where one particular data iteration is failing in current release and is to be fixed in the next...so we mark the failing test (which has a bug) as ignored with the bug ID as a comment just like for a full method.
Is there any existing solution for the above?

Many thanks,
Asif

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/UQEJfnyNoYAJ.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="sVBbmmMd9DwJ">spockfr...@googlegroups.com.
To unsubscribe from this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="sVBbmmMd9DwJ">spockframewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/KDyUp4SijdoJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Ignore specific iterations of spock test?

Asif Ameer
Hi,

I am able to ignore the iteration by intercepting the iteration. I simply check for a 'key' in the data table vs the key specified in the new annotation and skip the invocation if it matches.
However the iteration gets marked as 'Passed' , is there a way for me to mark the skipped iteration as "skipped" as is done by the out of the box Ignore* annotations? Using set skipped does not work and since it applies to the whole feature, does not seem correct to use either.

Thanks,
Asif

On Sunday, December 9, 2012 12:47:25 AM UTC-5, Asif Ameer wrote:
Thank you. I will look into it.

On Friday, December 7, 2012 2:12:36 PM UTC-5, Peter Niederwieser wrote:
This isn't something that's supported out-of-the-box. If you are willing to dig into the extension SPI, you should be able to achieve this with a Spock extension that registers an iteration interceptor on org.spockframework.runtime.model.FeatureInfo.

Cheers,
Peter

On Dec 7, 2012, at 6:35 PM, Asif Ameer <[hidden email]> wrote:

Hi,

Is there a way to ignore a specific iteration without having to comment out the data row?
This would be useful in cases where one particular data iteration is failing in current release and is to be fixed in the next...so we mark the failing test (which has a bug) as ignored with the bug ID as a comment just like for a full method.
Is there any existing solution for the above?

Many thanks,
Asif

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/UQEJfnyNoYAJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to spockframewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/1KD17nAO2f0J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Ignore specific iterations of spock test?

Asif Ameer
Hi,

Any advice on the above please?

Thanks,
Asif

On Wednesday, December 12, 2012 12:47:56 PM UTC-5, Asif Ameer wrote:
Hi,

I am able to ignore the iteration by intercepting the iteration. I simply check for a 'key' in the data table vs the key specified in the new annotation and skip the invocation if it matches.
However the iteration gets marked as 'Passed' , is there a way for me to mark the skipped iteration as "skipped" as is done by the out of the box Ignore* annotations? Using set skipped does not work and since it applies to the whole feature, does not seem correct to use either.

Thanks,
Asif

On Sunday, December 9, 2012 12:47:25 AM UTC-5, Asif Ameer wrote:
Thank you. I will look into it.

On Friday, December 7, 2012 2:12:36 PM UTC-5, Peter Niederwieser wrote:
This isn't something that's supported out-of-the-box. If you are willing to dig into the extension SPI, you should be able to achieve this with a Spock extension that registers an iteration interceptor on org.spockframework.runtime.model.FeatureInfo.

Cheers,
Peter

On Dec 7, 2012, at 6:35 PM, Asif Ameer <[hidden email]> wrote:

Hi,

Is there a way to ignore a specific iteration without having to comment out the data row?
This would be useful in cases where one particular data iteration is failing in current release and is to be fixed in the next...so we mark the failing test (which has a bug) as ignored with the bug ID as a comment just like for a full method.
Is there any existing solution for the above?

Many thanks,
Asif

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/UQEJfnyNoYAJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to spockframewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/qTv65o0JTi0J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Ignore specific iterations of spock test?

Peter Niederwieser
Administrator
There isn't currently a way to mark an iteration as skipped, but throwing an `org.junit.internal.AssumptionViolatedException` from the interceptor should work. Feel free to submit a feature request.

Cheers,
Peter

On Dec 14, 2012, at 11:07 PM, Asif Ameer <[hidden email]> wrote:

Hi,

Any advice on the above please?

Thanks,
Asif

On Wednesday, December 12, 2012 12:47:56 PM UTC-5, Asif Ameer wrote:
Hi,

I am able to ignore the iteration by intercepting the iteration. I simply check for a 'key' in the data table vs the key specified in the new annotation and skip the invocation if it matches.
However the iteration gets marked as 'Passed' , is there a way for me to mark the skipped iteration as "skipped" as is done by the out of the box Ignore* annotations? Using set skipped does not work and since it applies to the whole feature, does not seem correct to use either.

Thanks,
Asif

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Ignore specific iterations of spock test?

Asif Ameer
Wow! That does work. Thank you Peter!


On Fri, Dec 14, 2012 at 5:17 PM, Peter Niederwieser <[hidden email]> wrote:
There isn't currently a way to mark an iteration as skipped, but throwing an `org.junit.internal.AssumptionViolatedException` from the interceptor should work. Feel free to submit a feature request.

Cheers,
Peter

On Dec 14, 2012, at 11:07 PM, Asif Ameer <[hidden email]> wrote:

Hi,

Any advice on the above please?

Thanks,
Asif

On Wednesday, December 12, 2012 12:47:56 PM UTC-5, Asif Ameer wrote:
Hi,

I am able to ignore the iteration by intercepting the iteration. I simply check for a 'key' in the data table vs the key specified in the new annotation and skip the invocation if it matches.
However the iteration gets marked as 'Passed' , is there a way for me to mark the skipped iteration as "skipped" as is done by the out of the box Ignore* annotations? Using set skipped does not work and since it applies to the whole feature, does not seem correct to use either.

Thanks,
Asif

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Ignore specific iterations of spock test?

Subrahmanyam Rentala
In reply to this post by Peter Niederwieser
Hi Peter, 

Thanks for the info, but is there a way to ignore an iteration rather than skipping it ?


On Saturday, 15 December 2012 03:47:41 UTC+5:30, Peter Niederwieser wrote:
There isn't currently a way to mark an iteration as skipped, but throwing an `org.junit.internal.AssumptionViolatedException` from the interceptor should work. Feel free to submit a feature request.

Cheers,
Peter

On Dec 14, 2012, at 11:07 PM, Asif Ameer <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3w-YlUaO5scJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">asif...@...> wrote:

Hi,

Any advice on the above please?

Thanks,
Asif

On Wednesday, December 12, 2012 12:47:56 PM UTC-5, Asif Ameer wrote:
Hi,

I am able to ignore the iteration by intercepting the iteration. I simply check for a 'key' in the data table vs the key specified in the new annotation and skip the invocation if it matches.
However the iteration gets marked as 'Passed' , is there a way for me to mark the skipped iteration as "skipped" as is done by the out of the box Ignore* annotations? Using set skipped does not work and since it applies to the whole feature, does not seem correct to use either.

Thanks,
Asif

--
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: Ignore specific iterations of spock test?

Peter Niederwieser
Administrator
On 24 Dec 2014, at 08:44, Subrahmanyam Rentala <[hidden email]> wrote:

Hi Peter, 

Thanks for the info, but is there a way to ignore an iteration rather than skipping it ?

What’s the difference?

Cheers,
Peter

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

signature.asc (859 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Ignore specific iterations of spock test?

Subrahmanyam Rentala
I got it Peter. Thanks. I rechecked. Its working as expected.
Thanks again for the solution given.

On Wednesday, 24 December 2014 13:27:55 UTC+5:30, Peter Niederwieser wrote:
On 24 Dec 2014, at 08:44, Subrahmanyam Rentala <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="8TBXcrYAFE8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">gibral...@...> wrote:

Hi Peter, 

Thanks for the info, but is there a way to ignore an iteration rather than skipping it ?

What’s the difference?

Cheers,
Peter

--
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: Ignore specific iterations of spock test?

Subrahmanyam Rentala
In reply to this post by Peter Niederwieser
Hi Peter, 

Is there a way where I can skip/ignore the test case, but i dont want them in the JUNIT results to show them as skipped?
Please find attached image for reference.

Thanks,
Subrahmanyam

On Saturday, 15 December 2012 03:47:41 UTC+5:30, Peter Niederwieser wrote:
There isn't currently a way to mark an iteration as skipped, but throwing an `org.junit.internal.AssumptionViolatedException` from the interceptor should work. Feel free to submit a feature request.

Cheers,
Peter

On Dec 14, 2012, at 11:07 PM, Asif Ameer <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3w-YlUaO5scJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">asif...@...> wrote:

Hi,

Any advice on the above please?

Thanks,
Asif

On Wednesday, December 12, 2012 12:47:56 PM UTC-5, Asif Ameer wrote:
Hi,

I am able to ignore the iteration by intercepting the iteration. I simply check for a 'key' in the data table vs the key specified in the new annotation and skip the invocation if it matches.
However the iteration gets marked as 'Passed' , is there a way for me to mark the skipped iteration as "skipped" as is done by the out of the box Ignore* annotations? Using set skipped does not work and since it applies to the whole feature, does not seem correct to use either.

Thanks,
Asif

--
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 (13K) Download Attachment
Loading...