git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ant JUnit tests


That's what an assumption is for -- checking for preconditions.
Lack of preconditions does not mean the test should fail, it should not be
executed at all in order to avoid false negatives.
As I said, I will make assumptions explicit.
My question was, should I provide more information, like, what is the a
suitable value of ant.home?

Thanks, Gintas

2018-04-20 13:16 GMT+00:00 Jan Matèrne (jhm) <apache@xxxxxxxxxx>:

> Why not an assert with a meaningful message to test if the property is set?
>
> Jan
>
> > -----Ursprüngliche Nachricht-----
> > Von: Gintautas Grigelionis [mailto:g.grigelionis@xxxxxxxxx]
> > Gesendet: Freitag, 20. April 2018 10:42
> > An: Ant Developers List
> > Betreff: Re: Ant JUnit tests
> >
> > Assumption is a "friendly reminder" -- the test is does not run unless
> > the assumption is valid; the assumption provides an explanation of what
> > is missing. My question was about how friendly we should be.
> >
> > Gintas
> >
> > 2018-04-20 7:14 GMT+02:00 Jaikiran Pai <jai.forums2013@xxxxxxxxx>:
> >
> > > Like discussed in the other thread, I don't understand what's wrong
> > > with setting the expected properties in the IDE itself (like the
> > "ant.home").
> > > IDEs provide these configurations/settings for reasons like these.
> > > What would it achieve by virtually disabling these tests, in IDE, by
> > > adding those assumptions?
> > >
> > > -Jaikiran
> > >
> > >
> > >
> > > On 20/04/18 10:39 AM, Gintautas Grigelionis wrote:
> > >
> > >> I am refactoring Ant JUnit tests with a goal to make them more
> > >> "IDE-friendly". I found several tests that are implictly dependent
> > on
> > >> ant.home property being set. In these cases, the test should be
> > >> prevented from execution by adding an assumption; however, perhaps
> > >> there might be a suitable default, like basedir + "/bootstrap" or
> > >> some other location that might be suggested in, say, javadoc?
> > >>
> > >> Thanks, Gintas
> > >>
> > >>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxx For additional
> > > commands, e-mail: dev-help@xxxxxxxxxxxxxx
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxx
> For additional commands, e-mail: dev-help@xxxxxxxxxxxxxx
>
>


( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-ant-development/msg01851.html on line 134
Call Stack
#TimeMemoryFunctionLocation
10.0007368648{main}( ).../msg01851.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-ant-development/msg01851.html on line 134
Call Stack
#TimeMemoryFunctionLocation
10.0007368648{main}( ).../msg01851.html:0