15

Is there a way to access and view html report in Travis CI for maven testng tests ?

At this moment, Travis CI logs is the only way I see how many tests passed/failed/skipped etc.

Something like this: Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 50.427 sec

Results :

Tests run: 34, Failures: 0, Errors: 0, Skipped: 0

However there are surefire reports generated in this directory:

[INFO] Surefire report directory: /home/travis/build/xxxx/yyyy/target/surefire-reports

I want to access the surefire-reports/index.html file and view the results.

Is this possible,could someone help?

Eajaz
  • 469
  • 4
  • 21
  • Maybe i misunderstand a thing but if the tests are ok why just looking at the reports ? Tests are *green* ? BTW: If i understand the travis-ci docs you don't have access to the folders..cause they are running within Docker – khmarbaise Mar 06 '16 at 12:36
  • Thanks @khmarbaise..If any of my tests fails, I don't know what assertions went wrong and things like that. Travis CI logs only shows which tests failed, but not the "actual" and "expected" details of the failed tests. – Eajaz Mar 07 '16 at 17:03
  • If you don't know which assertion went wrong your test are not fine grained enough which sounds like you have a test case with multiple assertion in it. Better make tests which named based on what you expect and keep in mind that unit tests should be very short if not usually there is something wrong... – khmarbaise Mar 08 '16 at 07:57

1 Answers1

3

I had the same question too. Unfortunately it looks like Travis does not support HTML reporting. I haven't tried it, but based on the workaround suggested by this feature request, and this other SO question, we could use lynx -dump to render the HTML file and have Travis output it.

HaC
  • 902
  • 12
  • 24