SDK4
SDK4

Reputation: 59

Create ANT script to build on Tavis-CI and run JUnit tests on commit

I am developing a very simple application using Java, and using JUnit to test the application.

I need to be able to create an ANT script as well as a .travis.yml file so that my project can 1) build on Travis, and 2) Automatically run the JUnit tests on each commit.

You can see my revision history on GitHub, but the bigges issues that I have are that

  1. I have NO CLUE what to do with the ANT script, other then have Eclipse auto-generate it
  2. I don't know how to get Travis to run the tests automatically
  3. I (believe) I need to include the JUnit jar locally, but don't know how to reference that

I need help getting this all to work, if you can provide instructions that would be great, if you can submit a pull request that would be even better.

Upvotes: 2

Views: 1381

Answers (1)

Stefan Birkner
Stefan Birkner

Reputation: 24540

Your build.xml does not have a target test. You could add the line

script: ant <your_target>

to your .travis.yml file. E.g.

script: ant BackendSingletonTests

Upvotes: 2

Related Questions