Google Groups Home
Help | Sign in
Test suites running other suites
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Alan Livie  
View profile
 More options May 2, 10:33 am
From: Alan Livie <ALi...@efinancialcareers.com>
Date: Fri, 2 May 2008 09:33:30 -0500
Local: Fri, May 2 2008 10:33 am
Subject: Test suites running other suites
I have moved from cfcunit to mxunit and I'm loving the framework.

One thing I couldn't find in the docs is how to have a suite add other suites.

ie I can add a test using

testSuite.addAll("path.to.my.test");

in cfcunit I can also add a suite to a suite (ie a composite of suites and tests)
This is handy as I can then run smaller suites rather than the full whack.

Can I do this? Apologies if I'm being stupid :-)

Alan


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
billy  
View profile
 More options May 3, 7:38 am
From: billy <vir...@gmail.com>
Date: Sat, 3 May 2008 04:38:25 -0700 (PDT)
Local: Sat, May 3 2008 7:38 am
Subject: Re: Test suites running other suites
Hi Alan,

Thanks for the kind words. You're question has come up before, so, you
are not missing anything. Currently MXUnit only allows you to add
TestCases to TestSuites. With that said, we do plan in version 1.1 to
add in this composite capability. So, that may be sometime this Summer
after CFUnited. However, in lieu of creating explicit TestSuites, many
of us have found benefit using MXUnit's DirectoryTestSuite, which can
run every test, with optional recursion, in a directory. You can
exclude specific files, too. Additionally, using the MXUnit Eclipse
plug-in, you can search for directories, load tests, and run only the
one you want. This has the distinct benefit of not having to write any
explicit TestSuites; you just keep your tests in a test directory.

Hope this helps.

bill[y]

On May 2, 9:33 am, Alan Livie <ALi...@efinancialcareers.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Livie  
View profile
 More options May 3, 8:01 am
From: Alan Livie <ALi...@efinancialcareers.com>
Date: Sat, 3 May 2008 07:01:11 -0500
Local: Sat, May 3 2008 8:01 am
Subject: RE: [mxunit:379] Re: Test suites running other suites
Thanks for the reply Billy.

I'll look into the DirectoryTestSuite.

I'm using the Eclipse plugin and its excellent. Its actually the reason I now actually spend 50% of my time doing 'Test First' development.

Why not 100%? Old habits die hard ;-)

Look forward to v1.1.

Alan
________________________________________
From: mxunit@googlegroups.com [mxunit@googlegroups.com] On Behalf Of billy [vir...@gmail.com]
Sent: 03 May 2008 12:38
To: mxunit
Subject: [mxunit:379] Re: Test suites running other suites

Hi Alan,

Thanks for the kind words. You're question has come up before, so, you
are not missing anything. Currently MXUnit only allows you to add
TestCases to TestSuites. With that said, we do plan in version 1.1 to
add in this composite capability. So, that may be sometime this Summer
after CFUnited. However, in lieu of creating explicit TestSuites, many
of us have found benefit using MXUnit's DirectoryTestSuite, which can
run every test, with optional recursion, in a directory. You can
exclude specific files, too. Additionally, using the MXUnit Eclipse
plug-in, you can search for directories, load tests, and run only the
one you want. This has the distinct benefit of not having to write any
explicit TestSuites; you just keep your tests in a test directory.

Hope this helps.

bill[y]

On May 2, 9:33 am, Alan Livie <ALi...@efinancialcareers.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marc Esher  
View profile
 More options May 3, 8:44 am
From: "Marc Esher" <marc.es...@gmail.com>
Date: Sat, 3 May 2008 08:44:22 -0400
Local: Sat, May 3 2008 8:44 am
Subject: Re: [mxunit:380] Re: Test suites running other suites
Alan, you should be able to include entire directories in the
"excludes" attribute of directory test suite, too. for example, if you
had packages like this:

tests.blog.rss
    SimpleRSSTest.cfc
    SomeOtherRSSThingieTest.cfc
tests.blog.comments
    BlahTest.cfc
tests.blog.spamfilter
    Blah2Test.cfc

and you wanted to NOT run the spamfilter tests, you could do:

<cfset dir = expandPath(".")>
<cfset DTS = createObject("component","mxunit.runner.DirectoryTestSuite")>
<cfset excludes = "spamfilter">
<cfinvoke component="#DTS#"
        method="run"
        directory="#dir#"
        recurse="true"
        excludes="#excludes#"
        returnvariable="Results"
        componentpath="tests">
<cfoutput>#results.getResultsOutput("extjs")#</cfoutput>

If that filtering does not work for you, please let us know.

best,

marc


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google