You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Jeremy Cavanagh <je...@orange.fr> on 2021/05/13 16:12:08 UTC

How to test code changes in NetBeans source

Hi All,

First, I must apologise for asking such a question, but, I have trawled 
the internet and not found an answer.

My background is not computer science (which I expect you've already 
figured out) and so I have a big hole in my knowledge. However, I would 
like to look at some things in the NetBeans sources that interest/bug me.

What I need to know is how do you test any changed code? I can't believe 
it is necessary to rebuild the app every time that would surely take too 
long and possibly not very informative. For my system it varies between 
25 to 30 minutes. So when you change a class/module/cluster what do you 
do to see if it works correctly or needs more modifications.

Any guidance would be appreciated, especially, if it's in the right 
direction.

Kind regards

Jeremy

---------------------------------------------------------------------
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




Re: How to test code changes in NetBeans source

Posted by Svata Dedic <sv...@gmail.com>.
Dne 13. 05. 21 v 18:36 Laszlo Kishalmi napsal(a):
>> What I need to know is how do you test any changed code? I can't 
>> believe it is necessary to rebuild the app every time that would 
>> surely take too long and possibly not very informative. For my system 
>> it varies between 25 to 30 minutes. So when you change a 
>> class/module/cluster what do you do to see if it works correctly or 
>> needs more modifications.
>>

- patch small changes during debugging using Debug | Apply Code Changes 
to patch the code immediately within the running application. Cannot 
change class structure/method signatures and has some other limitations. 
Use Debug | Stack > Pop topmost call to reexecute the changed method 
(though done for you in most cases).

- set Main Project to the module you're changing. Upon run, only that 
module (+ its necessary dependencies, if not built already) are 
compiled. Takes a few seconds + the time to boot the application.

- when chaning layer registrations, make Clean & Rebuild of the affected 
module. If you suspect something is stale in the running app, erase 
nbbuild/testuserdir/var/cache directory (or its part relevant to what 
you suspect was improperly cached).

... and when satisfied, write tests (if possible) to make sure you 
covered the corner cases too and ensure that the Travis shouts loud if 
someone breaks your new functionality in the future :)

-S.

---------------------------------------------------------------------
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




Re: How to test code changes in NetBeans source

Posted by Laszlo Kishalmi <la...@gmail.com>.
Just right click on the module you've changed and Test.

Of course it is as good as the tests are, also from time to time it is 
worth to test all integrations / dependencies, so rebuild and test 
everything, but most common we are using our CI (Travis/GitHub) to do 
that when we create a branch/PR.

And then we have manually executed testcases for NetCat.

On 5/13/21 9:12 AM, Jeremy Cavanagh wrote:
> Hi All,
>
> First, I must apologise for asking such a question, but, I have 
> trawled the internet and not found an answer.
>
> My background is not computer science (which I expect you've already 
> figured out) and so I have a big hole in my knowledge. However, I 
> would like to look at some things in the NetBeans sources that 
> interest/bug me.
>
> What I need to know is how do you test any changed code? I can't 
> believe it is necessary to rebuild the app every time that would 
> surely take too long and possibly not very informative. For my system 
> it varies between 25 to 30 minutes. So when you change a 
> class/module/cluster what do you do to see if it works correctly or 
> needs more modifications.
>
> Any guidance would be appreciated, especially, if it's in the right 
> direction.
>
> Kind regards
>
> Jeremy
>
> ---------------------------------------------------------------------
> 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
>
>
>

---------------------------------------------------------------------
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