Sunday, October 11, 2015, 4:56:34 AM, Woonsan Ko wrote:

> Hi,
>
> When I added a new unit test, `ant test' seems failing in many test
> classes. e.g, FileTemplateLoaderTest, etc.

Maybe you ran into bugs in the test suite itself then. They are
supposed to pass without doing anything special. I have only ever ran
the test suite on Windows, and that's perhaps where the difference
lies. They also must be all green if you ran them from Eclipse (or
IntelliJ, etc.), and that's how I do it most of the time, since it's
easier to navigate to errors, etc. You don't need the command line
except for running JavaCC once (or after you have changed FTL.jj), and
perhaps before a pull request to see if you have accidentally used a
non-Java 5 API.

Anyway, can you look at the concrete errors to see if they are
environment dependencies?

> So, I had to change build.xml (in batchtest task) to include only my
> new test class locally.

At least in Eclipse I can just right click on a package or class or
method, and run it as JUnit test. (Then F11 to re-run it.)

> My dev env is Ant 1.9.6 (Ivy 2.4.0) and JDK 1.8 on OSX.

JDK 1.8 64 bit, 1.8.1, Windows 7 here... but if this matters, then
that should be fixed.

> How can I run all the unit tests successfully?
> Also, is there any tip to run single unit test in command line (like
> `mvn test -Dtest=...')?

I think there was, but I don't remember the exact syntax anymore. But
using you IDE is more efficient anyway.

> Thanks in advance,
>
> Woonsan
>

-- 
Thanks,
 Daniel Dekany

Reply via email to