blob: d5d0e3ae7d63ef46a09e9d4f349b03c945198053 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>NetBeans IDE - Testing and Code Analysis</title>
<meta http-equiv="content-language" content="en">
<meta name="description" content="DESCRIPTION HERE">
<link rel="stylesheet" type="text/css" href="../../features.css">
<link rel="stylesheet" type="text/css" href="/images_www/js/colorbox/colorbox.css">
</head>
<body>
<script type="text/javascript" src="/images_www/js/colorbox/jquery.colorbox-min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a.cbox').colorbox({rel: 'cbox', opacity: 0.7});
});
</script>
<div style="margin:10px 20px 0px 0px;">
<h1>Testing and Code Analysis</h1>
<p class="xintro">
<a href="../../images_www/v7/3/features/ide-findbugs-full.png"><img
src="../../images_www/v7/3/features/ide-analysis-main-cut.png"
alt="Java editor features in NetBeans IDE"><br>
<span class="font-11">Click image for fullscreen preview</span></a>
</p>
<p class="intro">
When you are testing your application, the IDE provides
tools for using JUnit and TestNG, as well as code analyzers,
in particular FindBugs.
</p>
<div class="line">&nbsp;</div>
<!-- left text section start -->
<a name="o1"></a>
<span id="im1" class="overview-right"><a href="../../images_www/v7/3/features/ide-testing-full.png" class="cbox" title="Testing"><img src="../../images_www/v7/3/features/ide-testing-cut.png" alt="" /></a></span>
<h2>Testing</h2>
<p> The IDE lets you create tests, using wizards and templates,
for the popular JUnit and TestNG test frameworks.</p>
<p>Once you have created tests for your Java classes,
you can run them individually or all at the same time.</p>
<p>The Test Results window shows the results of the tests you run.</p>
<a href="../../kb/docs/java/junit-intro.html" class="arr-link">
Writing JUnit Tests in NetBeans IDE</a>
<br/><a href="../../kb/docs/java/testng-screencast.html" class="arr-link">
Video of Using TestNG in NetBeans IDE</a>
<div class="line">&nbsp;</div>
<!-- left text section end -->
<!-- right text section start -->
<a name="o2"></a>
<span id="im1" class="overview-left"><a href="../../images_www/v7/3/features/ide-findbugs-full.png" class="cbox" title="Code Analysis"><img src="../../images_www/v7/3/features/ide-findbugs-cut.png" alt="" /></a></span>
<h2>Code Analysis</h2>
<p>Static analysis tools are integrated into the IDE. Using code patterns,
predefined by the IDE, by contributors, or yourself, you can
search your codebase for old code constructs, common syntax errors,
or other problems. For example,
you can search through all your applications simultaneously
for anonymous inner classes that have a single abstract method
and upgrade them to Java 8 lambda expressions.</p>
<p>In particular, the IDE provides support for the popular open source
FindBugs tool. FindBugs is a static analysis tool that
lets you identify bugs in Java code.</p>
<p><a href="../../kb/docs/java/code-inspect.html" class="arr-link">
Static Code Analysis in the NetBeans IDE Java Editor</a></p>
<div class="line">&nbsp;</div>
<!-- right text section end -->
<h2>See Also</h2>
<ul class="bigger">
<li><a href="/community/releases/81/index.html">NetBeans IDE 8.1 Release Page</a> for a list of specific features in the latest stable release.</li>
<li><a href="../../kb/trails/java-se.html">General Java Development Learning Trail</a> for tutorials that will help you get started.</li>
</ul>
</div>
</body>
</html>