These 2 links might be of some use to you if you have isolated the missing
test:
http://maven.apache.org/plugins/maven-surefire-plugin/examples/single-test.html
http://maven.apache.org/plugins/maven-surefire-plugin/examples/debugging.html


On Thu, Mar 3, 2011 at 4:29 AM, Ryan J Baxter <[email protected]> wrote:

> If anyone knows the best way to debug the tests that would be great. Right
> now my test case is failing when trying to create an object from my
> feature, but I have no idea why its happening.  It's like it's not testing
> against the right JS file.  How does jsunit know what JS file you are
> testing against.  Is it based on the name and path?  The sure-fire reports
> just tell you the test that fails and not why.
>
> -Ryan
>
> Email: [email protected]
> Phone: 978-899-3041
> developerWorks Profile
>
>
>
> From:   John Hjelmstad <[email protected]>
> To:     [email protected],
> Cc:     Ryan J Baxter/Westford/IBM@Lotus
> Date:   03/02/2011 04:51 PM
> Subject:        Re: Unit Tests For Features
>
>
>
> I believe it's possible to run the jsUnit server the build rule does, but
> I
> haven't done it. I've been lucky in that my need to iterate on tests has
> been relatively low, so I have just ended up peppering them with a whole
> lot
> of assertX(...) calls, essentially the equivalent of printf debugging.
>
> On Wed, Mar 2, 2011 at 1:37 PM, Ryan J Baxter <[email protected]> wrote:
>
> > Your right John, the tests are only in the surefire-reports and it was
> > failing because of some test I tried adding, so at least I know its
> > working :)  Is there anyway to debug these tests when they run?
> >
> > -Ryan
> >
> > Email: [email protected]
> > Phone: 978-899-3041
> > developerWorks Profile
> >
> >
> >
> > From:   John Hjelmstad <[email protected]>
> > To:     [email protected],
> > Cc:     Ryan J Baxter/Westford/IBM@Lotus
> > Date:   03/02/2011 03:51 PM
> > Subject:        Re: Unit Tests For Features
> >
> >
> >
> > Hmm, that sounds like the tests did run, but had errors. The output
> isn't
> > especially obvious, and usually ends up in a surefire-reports directory.
> >
> > On Wed, Mar 2, 2011 at 12:24 PM, Ryan J Baxter <[email protected]>
> > wrote:
> >
> > > Hi John,
> > >
> > > I tried running maven tests on the shindig-features directory but the
> > > tests did not run.
> > >
> > > -------------------------------------------------------
> > >  T E S T S
> > > -------------------------------------------------------
> > > Concurrency config is parallel='both', perCoreThreadCount=true,
> > > threadCount=2, useUnlimitedThreads=false
> > > There are no tests to run.
> > >
> > > Results :
> > >
> > > Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> > >
> > > [INFO] [jsunit2:jsunit-test {execution: default}]
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [ERROR] BUILD FAILURE
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [INFO] There have been 1 errors and 0 failures testing JavaScript
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [INFO] For more information, run Maven with the -e switch
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [INFO] Total time: 9 seconds
> > > [INFO] Finished at: Wed Mar 02 15:24:48 EST 2011
> > > [INFO] Final Memory: 39M/84M
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > >
> > > -Ryan
> > >
> > > Email: [email protected]
> > > Phone: <978-899-3041>978-899-3041
> > > developerWorks Profile
> > >
> > >
> > >
> > > From:   John Hjelmstad <[email protected]>
> > > To:     [email protected],
> > > Cc:     Ryan J Baxter/Westford/IBM@Lotus
> > > Date:   03/02/2011 01:59 PM
> > > Subject:        Re: Unit Tests For Features
> > >
> > >
> > >
> > > Hi Ryan,
> > >
> > > The tests are actually all run when you simply run 'mvn' on Shindig or
> > > just the features directory.
> > >
> > > I'm not too sure about the runner.sh script... I've seen some weird
> > cruft
> > > around (such as a list of test files in a features pom.xml) which
> might
> > be
> > > related.
> > >
> > > --j
> > >
> > > On Wed, Mar 2, 2011 at 8:54 AM, Ryan J Baxter <[email protected]>
> > wrote:
> > > Hi everyone, I have added a new feature and want to add some unit
> tests
> > > for it.  In the shindig-features project there is
> > > src/test/javascript/features which seems to container unit tests for
> > some
> > > features.  It looks link in the bin folder of shindig-features there
> is
> > a
> > > runner.sh file to run all the tests.  I tried running that script, but
> > it
> > > fails because it is looking for some files which no longer exist or
> have
> > > been moved.  Is this the correct way to run these unit tests?  Are
> these
> > > tests maintained?
> > >
> > > -Ryan
> > >
> > > Email: [email protected]
> > > Phone: <978-899-3041>978-899-3041
> > > developerWorks Profile
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>

Reply via email to