ciscoheat / buddy

Your friendly BDD testing library for Haxe!
MIT License
96 stars 24 forks source link

Custom EvalTest for travis-hx #25

Closed profelis closed 10 years ago

profelis commented 10 years ago

Will be great to add custom EvalTest for buddy in https://github.com/waneck/travis-hx library

default EvalTest https://github.com/waneck/travis-hx/blob/master/extra/evaluate-test/EvalTest.hx

fponticelli commented 10 years ago

I spent some time making utest work with travis-hx so let me know if I can help.

profelis commented 10 years ago

Will be great to add standardised output in all libraries (like utest and buddy).

for example: -D travisOutput add special lines in end of output which travis-hx understand and correct parse.

ciscoheat commented 10 years ago

I think that can be done with a custom Reporter, so you can compile the tests with -D reporter=buddy.reporting.TravisReporter and get the output for travis-hx. How's that?

waneck commented 10 years ago

I'd be very happy to add the changes to the default eval test, so it can work out-of-the-box with buddy, if possible.

profelis commented 10 years ago

@waneck current buddy reporter write this line https://github.com/ciscoheat/buddy/blob/master/src/buddy/reporting/ConsoleReporter.hx#L111

with all needed data. But standardised output looks better, imo

profelis commented 10 years ago

@ciscoheat https://github.com/profelis/bindx2/blob/master/test/buddy/TravisReporter.hx

ciscoheat commented 10 years ago

Thanks! I'll add it right away, just renaming it to TravisHxReporter to be more precise. :)

ciscoheat commented 10 years ago

Added now in a59a7df310e9857eea5bfc31a7274aeeaeb1cac2 (0.14.4)

Any ideas how to standardize it? I don't know what are the chances that someone gets success: true in the output of some failed tests, shouldn't be too high.

The indexOf tests in EvalTest.hx could be changed to == 0 to do the test at the beginning of the line for some safety.

profelis commented 10 years ago

I found new problem,js.Sys use browser api. https://github.com/waneck/travis-hx/pull/4#issuecomment-63202858 @waneck explanation

I pached Sys https://github.com/profelis/bindx2/blob/master/test/buddy/TravisReporter.hx#L146 but not tested yet

profelis commented 10 years ago

still problem https://travis-ci.org/profelis/bindx2/jobs/41134469#L342

I'll try to pull request fix in core