Run a single Spock spec method, like with JUnit tests?

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

Run a single Spock spec method, like with JUnit tests?

KARR, DAVID
In a JUnit test, if I select a test method and execute "Run As ... JUnit Test", it will just run that test method.  While working on my first Spock-based tests, I thought this was working the same way, but I either didn't notice that it was running all of my test specs, or it's just not working anymore.  If I select the name of the spec and execute "Run As ... JUnit Test", it runs all the specs in the class, not just the one I have selected.

Is this something that's supposed to work?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Run a single Spock spec method, like with JUnit tests?

Ken Krebs
You can place the cursor on the 1st line of the feature method in quesation and then "Run as" and it will only run that test.

On Mon, Mar 30, 2015 at 2:56 PM, KARR, DAVID <[hidden email]> wrote:
In a JUnit test, if I select a test method and execute "Run As ... JUnit Test", it will just run that test method.  While working on my first Spock-based tests, I thought this was working the same way, but I either didn't notice that it was running all of my test specs, or it's just not working anymore.  If I select the name of the spec and execute "Run As ... JUnit Test", it runs all the specs in the class, not just the one I have selected.

Is this something that's supposed to work?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Run a single Spock spec method, like with JUnit tests?

KARR, DAVID

So when I said that I selected the function name, it isn’t obvious that the cursor is on that line?  What you’re describing works fine for my unit test, but it just doesn’t work for the integration test.

 

From: Ken Krebs [mailto:[hidden email]]
Sent: Tuesday, March 31, 2015 3:15 PM
To: [hidden email]
Subject: Re: [groovy-eclipse-plugin-user] Run a single Spock spec method, like with JUnit tests?

 

You can place the cursor on the 1st line of the feature method in quesation and then "Run as" and it will only run that test.

 

On Mon, Mar 30, 2015 at 2:56 PM, KARR, DAVID <[hidden email]> wrote:

In a JUnit test, if I select a test method and execute "Run As ... JUnit Test", it will just run that test method.  While working on my first Spock-based tests, I thought this was working the same way, but I either didn't notice that it was running all of my test specs, or it's just not working anymore.  If I select the name of the spec and execute "Run As ... JUnit Test", it runs all the specs in the class, not just the one I have selected.

Is this something that's supposed to work?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Run a single Spock spec method, like with JUnit tests?

Ken Krebs
You did not say anything about it being an integration test and it was not obvious because of that.

On Tue, Mar 31, 2015 at 5:29 PM, KARR, DAVID <[hidden email]> wrote:

So when I said that I selected the function name, it isn’t obvious that the cursor is on that line?  What you’re describing works fine for my unit test, but it just doesn’t work for the integration test.

 

From: Ken Krebs [mailto:[hidden email]]
Sent: Tuesday, March 31, 2015 3:15 PM
To: [hidden email]
Subject: Re: [groovy-eclipse-plugin-user] Run a single Spock spec method, like with JUnit tests?

 

You can place the cursor on the 1st line of the feature method in quesation and then "Run as" and it will only run that test.

 

On Mon, Mar 30, 2015 at 2:56 PM, KARR, DAVID <[hidden email]> wrote:

In a JUnit test, if I select a test method and execute "Run As ... JUnit Test", it will just run that test method.  While working on my first Spock-based tests, I thought this was working the same way, but I either didn't notice that it was running all of my test specs, or it's just not working anymore.  If I select the name of the spec and execute "Run As ... JUnit Test", it runs all the specs in the class, not just the one I have selected.

Is this something that's supposed to work?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

 


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Run a single Spock spec method, like with JUnit tests?

KARR, DAVID

Yes, you’re right.  I had mentioned it was an integration test in another place, but I see I didn’t mention that here.  Sorry about that.

 

From: Ken Krebs [mailto:[hidden email]]
Sent: Tuesday, March 31, 2015 3:38 PM
To: [hidden email]
Subject: Re: [groovy-eclipse-plugin-user] Run a single Spock spec method, like with JUnit tests?

 

You did not say anything about it being an integration test and it was not obvious because of that.

 

On Tue, Mar 31, 2015 at 5:29 PM, KARR, DAVID <[hidden email]> wrote:

So when I said that I selected the function name, it isn’t obvious that the cursor is on that line?  What you’re describing works fine for my unit test, but it just doesn’t work for the integration test.

 

From: Ken Krebs [mailto:[hidden email]]
Sent: Tuesday, March 31, 2015 3:15 PM
To: [hidden email]
Subject: Re: [groovy-eclipse-plugin-user] Run a single Spock spec method, like with JUnit tests?

 

You can place the cursor on the 1st line of the feature method in quesation and then "Run as" and it will only run that test.

 

On Mon, Mar 30, 2015 at 2:56 PM, KARR, DAVID <[hidden email]> wrote:

In a JUnit test, if I select a test method and execute "Run As ... JUnit Test", it will just run that test method.  While working on my first Spock-based tests, I thought this was working the same way, but I either didn't notice that it was running all of my test specs, or it's just not working anymore.  If I select the name of the spec and execute "Run As ... JUnit Test", it runs all the specs in the class, not just the one I have selected.

Is this something that's supposed to work?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

 

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Run a single Spock spec method, like with JUnit tests?

KARR, DAVID
In reply to this post by KARR, DAVID
> -----Original Message-----
> From: KARR, DAVID
> Sent: Monday, March 30, 2015 12:56 PM
> To: [hidden email]
> Subject: [groovy-eclipse-plugin-user] Run a single Spock spec method, like
> with JUnit tests?
>
> In a JUnit test, if I select a test method and execute "Run As ... JUnit
> Test", it will just run that test method.  While working on my first
> Spock-based tests, I thought this was working the same way, but I either
> didn't notice that it was running all of my test specs, or it's just not
> working anymore.  If I select the name of the spec and execute "Run As ...
> JUnit Test", it runs all the specs in the class, not just the one I have
> selected.
>
> Is this something that's supposed to work?

To reiterate, what I've been seeing is that this behavior has always worked fine in unit tests, but always did not work in my integration test.  My test case is just clicking the mouse in the "def" method name and running "Run As ... Unit Test".

What is now frustrating is that this was failing all the way up to this morning, when I first demonstrated this in a small group meeting to show my current issues.  The usual rule about demos is that they will randomly fail in unexpected ways when you depend on them working.  This is the first time I've seen a demo WORK when it was supposed to fail.  I've continued to test this, and I can't get it behave incorrectly.  I don't know why all of my previous attempts at running a single test method resulted in Eclipse running all of the test methods.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...