You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Eric Bresie <eb...@gmail.com> on 2021/02/19 16:42:52 UTC
Netbean Unit Tests
While working on some NB code and trying some of the unit tests, I have
been seeing some test warnings indicating something like
"No tests found in
org.netbeans.modules.db.sql.editor.completion.CompletionQueryTestCase
junit.framework.AssertionFailedError"
Why is this warning registering (and causing a failure)?
Assume Netbean Tests are based on JUnit tests and maybe it's complaining
because there are no annotated tests (i.e. @Test) present or maybe the
method containing the "assert" test is not named correctly (i.e. is
"CompleteQueryTestCase" and not something like "testCompleteQueryTestCase"
type method names.
What is the general practice when developing unit tests in Netbeans?
Eric Bresie
ebresie@gmail.com
Re: Netbean Unit Tests
Posted by Jaroslav Tulach <ja...@gmail.com>.
I see! Only classes that end with Test.class are executed during “ant test” runs.
-jt
> 3. 3. 2021 v 17:11, Eric Bresie <eb...@gmail.com>:
>
>
> For closure, the problem with this one turned out to be the above "test" was in fact not a test but a shared class used on other related tests.
>
> Eric Bresie
> ebresie@gmail.com
>
>
>> On Sun, Feb 21, 2021 at 12:17 PM Jaroslav Tulach <ja...@gmail.com> wrote:
>> Dne pátek 19. února 2021 17:42:52 CET, Eric Bresie napsal(a):
>> > While working on some NB code and trying some of the unit tests, I have
>> > been seeing some test warnings indicating something like
>> >
>> > "No tests found in
>> > org.netbeans.modules.db.sql.editor.completion.CompletionQueryTestCase
>> > junit.framework.AssertionFailedError"
>> >
>> > Why is this warning registering (and causing a failure)?
>> >
>> > Assume Netbean Tests are based on JUnit tests and maybe it's complaining
>> > because there are no annotated tests (i.e. @Test) present or maybe the
>> > method containing the "assert" test is not named correctly (i.e. is
>> > "CompleteQueryTestCase" and not something like "testCompleteQueryTestCase"
>> > type method names.
>> >
>> > What is the general practice when developing unit tests in Netbeans?
>>
>> https://openide.netbeans.org/tutorial/test-patterns.html
>> -jt
>>
>>
>>
Re: Netbean Unit Tests
Posted by Eric Bresie <eb...@gmail.com>.
For closure, the problem with this one turned out to be the above "test"
was in fact not a test but a shared class used on other related tests.
Eric Bresie
ebresie@gmail.com
On Sun, Feb 21, 2021 at 12:17 PM Jaroslav Tulach <ja...@gmail.com>
wrote:
> Dne pátek 19. února 2021 17:42:52 CET, Eric Bresie napsal(a):
> > While working on some NB code and trying some of the unit tests, I have
> > been seeing some test warnings indicating something like
> >
> > "No tests found in
> > org.netbeans.modules.db.sql.editor.completion.CompletionQueryTestCase
> > junit.framework.AssertionFailedError"
> >
> > Why is this warning registering (and causing a failure)?
> >
> > Assume Netbean Tests are based on JUnit tests and maybe it's complaining
> > because there are no annotated tests (i.e. @Test) present or maybe the
> > method containing the "assert" test is not named correctly (i.e. is
> > "CompleteQueryTestCase" and not something like
> "testCompleteQueryTestCase"
> > type method names.
> >
> > What is the general practice when developing unit tests in Netbeans?
>
> https://openide.netbeans.org/tutorial/test-patterns.html
> -jt
>
>
>
>
Re: Netbean Unit Tests
Posted by Jaroslav Tulach <ja...@gmail.com>.
Dne pátek 19. února 2021 17:42:52 CET, Eric Bresie napsal(a):
> While working on some NB code and trying some of the unit tests, I have
> been seeing some test warnings indicating something like
>
> "No tests found in
> org.netbeans.modules.db.sql.editor.completion.CompletionQueryTestCase
> junit.framework.AssertionFailedError"
>
> Why is this warning registering (and causing a failure)?
>
> Assume Netbean Tests are based on JUnit tests and maybe it's complaining
> because there are no annotated tests (i.e. @Test) present or maybe the
> method containing the "assert" test is not named correctly (i.e. is
> "CompleteQueryTestCase" and not something like "testCompleteQueryTestCase"
> type method names.
>
> What is the general practice when developing unit tests in Netbeans?
https://openide.netbeans.org/tutorial/test-patterns.html
-jt
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists