Any way to make Eclipse run only a single 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

Any way to make Eclipse run only a single spec method, like with JUnit tests?

KARR, DAVID
Using Eclipse, for a while, I thought that if I selected the name of a spec method and executed "Run As ... JUnit Test", it would only execute that one spec method.  Did I imagine that?  I'm no longer able to make that work.  Obviously, this is technically an Eclipse question, but I figured someone here would know whether this is supposed to work.

I'm using Luna and the latest released plugin.

--
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: Any way to make Eclipse run only a single spec method, like with JUnit tests?

Kostis Kapelonis
Yes it works. You did not imagine that.

When you you say it does not work, do you mean that the menu option is
not available or that the test does not run after executing the menu
command?

Can you verify that your folder which contains the Spock tests is
indeed in the build path as a source folder?



On Sun, Mar 29, 2015 at 9:35 PM, KARR, DAVID <[hidden email]> wrote:

> Using Eclipse, for a while, I thought that if I selected the name of a spec method and executed "Run As ... JUnit Test", it would only execute that one spec method.  Did I imagine that?  I'm no longer able to make that work.  Obviously, this is technically an Eclipse question, but I figured someone here would know whether this is supposed to work.
>
> I'm using Luna and the latest released plugin.
>
> --
> 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: Any way to make Eclipse run only a single spec method, like with JUnit tests?

KARR, DAVID
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Kostis Kapelonis
> Sent: Monday, March 30, 2015 1:03 PM
> To: [hidden email]
> Subject: Re: Any way to make Eclipse run only a single spec method, like
> with JUnit tests?
>
> Yes it works. You did not imagine that.
>
> When you you say it does not work, do you mean that the menu option is
> not available or that the test does not run after executing the menu
> command?
>
> Can you verify that your folder which contains the Spock tests is
> indeed in the build path as a source folder?

"does not work" means that it runs all the spec methods, not just the one I've selected.

I've confirmed that the folder with this test is included in the build path as a source folder.  I wouldn't be able to run them at all if that wasn't the case.

The other curious fact is that this feature IS working for my unit test spec, but is NOT working for my integration test spec.  I've gone back and forth between them, and this is consistent.

> On Sun, Mar 29, 2015 at 9:35 PM, KARR, DAVID <[hidden email]> wrote:
> > Using Eclipse, for a while, I thought that if I selected the name of a
> spec method and executed "Run As ... JUnit Test", it would only execute
> that one spec method.  Did I imagine that?  I'm no longer able to make
> that work.  Obviously, this is technically an Eclipse question, but I
> figured someone here would know whether this is supposed to work.
> >
> > I'm using Luna and the latest released plugin.
> >
> > --
> > 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: Any way to make Eclipse run only a single spec method, like with JUnit tests?

checketts
Do you have @StepWise on the Integration test?

KARR, DAVID wrote:
-----Original Message-----
From: [hidden email]
[[hidden email]] On Behalf Of Kostis Kapelonis
Sent: Monday, March 30, 2015 1:03 PM
To: [hidden email]
Subject: Re: Any way to make Eclipse run only a single spec method, like
with JUnit tests?

Yes it works. You did not imagine that.

When you you say it does not work, do you mean that the menu option is
not available or that the test does not run after executing the menu
command?

Can you verify that your folder which contains the Spock tests is
indeed in the build path as a source folder?

"does not work" means that it runs all the spec methods, not just the one I've selected.

I've confirmed that the folder with this test is included in the build path as a source folder.  I wouldn't be able to run them at all if that wasn't the case.

The other curious fact is that this feature IS working for my unit test spec, but is NOT working for my integration test spec.  I've gone back and forth between them, and this is consistent.

On Sun, Mar 29, 2015 at 9:35 PM, KARR, DAVID [hidden email] wrote:
Using Eclipse, for a while, I thought that if I selected the name of a
spec method and executed "Run As ... JUnit Test", it would only execute
that one spec method.  Did I imagine that?  I'm no longer able to make
that work.  Obviously, this is technically an Eclipse question, but I
figured someone here would know whether this is supposed to work.
I'm using Luna and the latest released plugin.

--
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: Any way to make Eclipse run only a single spec method, like with JUnit tests?

KARR, DAVID

Nope.  Each of these test methods are independent.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Clint Checketts
Sent: Monday, March 30, 2015 1:20 PM
To: [hidden email]
Subject: Re: Any way to make Eclipse run only a single spec method, like with JUnit tests?

 

Do you have @StepWise on the Integration test?

KARR, DAVID wrote:

-----Original Message-----
From: [hidden email]
[[hidden email]] On Behalf Of Kostis Kapelonis
Sent: Monday, March 30, 2015 1:03 PM
To: [hidden email]
Subject: Re: Any way to make Eclipse run only a single spec method, like
with JUnit tests?
 
Yes it works. You did not imagine that.
 
When you you say it does not work, do you mean that the menu option is
not available or that the test does not run after executing the menu
command?
 
Can you verify that your folder which contains the Spock tests is
indeed in the build path as a source folder?
 
"does not work" means that it runs all the spec methods, not just the one I've selected.
 
I've confirmed that the folder with this test is included in the build path as a source folder.  I wouldn't be able to run them at all if that wasn't the case.
 
The other curious fact is that this feature IS working for my unit test spec, but is NOT working for my integration test spec.  I've gone back and forth between them, and this is consistent.
 
On Sun, Mar 29, 2015 at 9:35 PM, KARR, DAVID [hidden email] wrote:
Using Eclipse, for a while, I thought that if I selected the name of a
spec method and executed "Run As ... JUnit Test", it would only execute
that one spec method.  Did I imagine that?  I'm no longer able to make
that work.  Obviously, this is technically an Eclipse question, but I
figured someone here would know whether this is supposed to work.
I'm using Luna and the latest released plugin.
 
--
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.

--
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: Any way to make Eclipse run only a single spec method, like with JUnit tests?

KARR, DAVID
In reply to this post by KARR, DAVID
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of KARR, DAVID
> Sent: Monday, March 30, 2015 1:19 PM
> To: [hidden email]
> Subject: RE: Any way to make Eclipse run only a single spec method, like
> with JUnit tests?
>
> > -----Original Message-----
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf Of Kostis Kapelonis
> > Sent: Monday, March 30, 2015 1:03 PM
> > To: [hidden email]
> > Subject: Re: Any way to make Eclipse run only a single spec method, like
> > with JUnit tests?
> >
> > Yes it works. You did not imagine that.
> >
> > When you you say it does not work, do you mean that the menu option is
> > not available or that the test does not run after executing the menu
> > command?
> >
> > Can you verify that your folder which contains the Spock tests is
> > indeed in the build path as a source folder?
>
> "does not work" means that it runs all the spec methods, not just the one
> I've selected.
>
> I've confirmed that the folder with this test is included in the build
> path as a source folder.  I wouldn't be able to run them at all if that
> wasn't the case.
>
> The other curious fact is that this feature IS working for my unit test
> spec, but is NOT working for my integration test spec.  I've gone back and
> forth between them, and this is consistent.

If it helps, here's an excerpt from my integration test, showing the first two spec methods:
---------------------------
class YangPluginIntegSpec extends IntegrationSpec {
       
        def setup() {
        }
       
        def 'yangFilesRootDir exists'() {
                when:
                directory("src/main/yang")
                buildFile << applyPlugin(YangPlugin)
                buildFile << '''
                        yang {
                                yangFilesRootDir 'src/main/yang'
                        }
                '''.stripIndent()

                ExecutionResult result = runTasksSuccessfully('build')

                then:
                result
        }
       
        def 'yangFilesRootDir does not exist'() {
                when:
                directory("src/main/yang")
                buildFile << applyPlugin(YangPlugin)
                buildFile << '''
                        yang {
                                yangFilesRootDir 'src/main/other/yang'
                        }
                '''.stripIndent()

                ExecutionResult result = runTasksWithFailure('build')

                then:
                !result.wasUpToDate("yangGenerate")
        }
---------------

>
> > On Sun, Mar 29, 2015 at 9:35 PM, KARR, DAVID <[hidden email]> wrote:
> > > Using Eclipse, for a while, I thought that if I selected the name of a
> > spec method and executed "Run As ... JUnit Test", it would only execute
> > that one spec method.  Did I imagine that?  I'm no longer able to make
> > that work.  Obviously, this is technically an Eclipse question, but I
> > figured someone here would know whether this is supposed to work.
> > >
> > > I'm using Luna and the latest released plugin.
> > >
> > > --
> > > 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.

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