this tutorial?
https://netbeans.apache.org/kb/docs/java/junit-intro.html
or do you mean something else?
-mbien
On 19.01.22 07:00, Arnaud bourree wrote:
Hi,
NB14 will let me time to (re)write JUnit tutorial.
About tutorial, should I start with a fresh one, or should have to
update the existing one?
My feeling about tutorial should be more how Netbeans help us to
write/run tests than what are JUnit tests. What do you think?
Regardes
Arnaud
Le mar. 18 janv. 2022 à 20:12, Michael Bien <mbie...@gmail.com> a écrit :
i saw it, looks good on first glance but i had no time to test it
so far - thanks!
i put it on the NB14 milestone since NB13 is in feature freeze.
congrats for your first contribution,
-mbien
On 18.01.22 06:38, Arnaud bourree wrote:
Hi,
Here it is my first contribution to NetBeans:
https://github.com/apache/netbeans/pull/3470
Maybe to late for NB13.
Regardes
Arnaud
Le jeu. 13 janv. 2022 à 15:40, Arnaud bourree
<arnaud.bour...@gmail.com> a écrit :
Again thanks you William
I said that custom action cannot provide workaround : that's
false
Here is workaround to run all tests from on integration test
class:
1. right click in editor of you integration test file
2. select "Run Maven >" then "Goals..."
3. as Goals, enter "integration-test" or "verify", I select
verify because I expect post-integration-test to be run
after test
4. as Properties, enter like in integration-test default action:
test=DummyToSkipUnitTests
failIfNoTests=false
it.test=${packageClassName}
5. check "Remember as" and enter a name, I choose "Run IT test"
Et voila, tests of your integration test class run.
Thanks to point 5, now, you can run an integration test class
by selectin "Run IT test" at point 2.
At the end, you should have in nbactions.xml file in your
project on action likes:
<action>
<actionName>CUSTOM-Run IT test</actionName>
<displayName>Run IT test</displayName>
<recursive>false</recursive>
<goals>
<goal>verify</goal>
</goals>
<properties>
<test>DummyYoSkipUnitTests</test>
<failIfNoTests>false</failIfNoTests>
<it.test>${packageClassName}</it.test>
</properties>
</action>
Regards,
Arnaud
Le jeu. 13 janv. 2022 à 14:04, Arnaud bourree
<arnaud.bour...@gmail.com> a écrit :
Thank you William.
I never use Gradle, I suppose you are right.
With Maven's project, we can also add custom actions,That
could be a good workaround.
But actions are not contextual actions such as "Test
File" or "Run Focused Test Method", they work at project
level not file level, or I don't understand how they work.
Regards,
Arnaud
Le jeu. 13 janv. 2022 à 00:48, * William
<william.full.m...@gmail.com> a écrit :
Hi Arnaud,
I am able to run integration tests from the netbeans
project tree using Gradle, may be there is something
similar with Maven. Under each project you want to
use a Gradle task you can set-=up an entry in the
project's "gradle.properties" file, so:
## Netbeans Actions
##
## * Gradle tasks
##
action.custom-1=intTest
action.custom-1.args=--configure-on-demand -w -x
check intTest
action.custom-2=intTest_debug
action.custom-2.args=--configure-on-demand -w -x
check intTest --debug-jvm
I am not sure if there is a Gradle plugin required to
achieve this though, it just worked when I did it
after reading a stackoverflow post.
It is well worth checking for a Maven equivalent to
the custom actions. Another approach is to convert
from Maven to Gradle which has a learning curve of
course.
Good luck there. I'm for any thing that advances
testing.
--
aloha,
\_w_/
___________________________________
On Tue, 4 Jan 2022 at 23:44, Arnaud bourree
<arnaud.bour...@gmail.com> wrote:
Hello,
I use Netbeans 12.6 on Windows server 2016 with
OpenJDK 11 and Maven 3.6.3
I've some integration tests written with JUnit
that Maven knows how to launch with failsafe.
I'd like to run integration tests like unitary
tests from Netbeans.
I saw that there are project actions "Integration
test file" and "Debug integration test".
I expect Netbeans to propose to me something like
"Test Integration File" instead of "Test File" on
JUnit tests matching failsafe configuration : it
doesn't.
I didn't find any web pages explaining how to nor
any limitation?
Any idea how to?
Regards,
Arnaud