TS 73 Maven

Test Specification: Maven Support Test Specification

Author:Tomas MusilVersion: 7.26Introduction: This document serves mostly as a test specification for Maven specific functionality in Netbeans IDE - it should cover all most important features of Maven functionality,however this test specification can't cover all scenarios with Maven,and it should be tested by specific components responsible engineers along with Ant scenarios. Setup: To create and build Maven project, just use the Maven 3.x bundled with the IDE. Also, for J2EE projects, test in all cases JavaEE5, JavaEE6 and JavaEE7 projects.

In New Project wizard select Maven > Maven Enterprise Application and push Next

Type EntAppPrj to the Project Name field and push Next

Push Finish

EXPECTED RESULT:Four projects are created (ear,ejb,pom and war), the output contains message about "BUILD SUCCESS".There's missing dependencies warning icon in Projects tab. Check that it can be resolved using "Show and resolve problem" action from context menu.

Create NetBeans Module archetype

Go to main menu File | New Project

In New Project wizard select Maven > Maven Project and push Next

Select Maven NetBeans Module Archetype and push Next

Type NBModulePrj to the Project Name field and push Finish

EXPECTED RESULT:The project is created, the output contains message about "BUILD SUCCESSFUL".There's missing dependencies warning icon in Projects tab. Do build and this will disappear.

Create NetBeans Platform Application archetype

Go to main menu File | New Project

In New Project wizard select Maven | NetBeans Platform Application and push Next

Type NBAppPrj to the Project Name field, check to create sample module and push Finish

EXPECTED RESULT:Values are stored in nb-configuration.xml and are used when editing pom.xml .

Test suite: Create templates in maven projects

Purpose: Test creating different templates in maven project

Create package

Create package in QuickstartPrj

EXPECTED RESULT:Package is created and is empty .

Create JFrame form

Create new JFrame form file in QuickstartPrj's newly crated package

EXPECTED RESULT:The JFrame is available and is properly generated and opened in editor window.

Create XML document

Create new XML Document file in QuickstartPrj's newly crated package

Left everything set on default.

EXPECTED RESULT:The XML file is available and is properly generated and opened in editor window.

Create new Java class

Create new Java class file in QuickstartPrj's newly crated package

EXPECTED RESULT:The Java class file is available and is properly generated and opened in editor window.

Test suite: Refactoring

Purpose: Test main refactoring in maven project

Rename package

Rename java package created in previous test suite to sun.my.pack

Select Refactor > Rename and click on Refactor.

EXPECTED RESULT:Rename succeeds, the code is compilable.

Rename java class

Rename java file created in previous test suite to MyClass

Select Refactor > Rename and click on Refactor.

EXPECTED RESULT:The file is renamed and compilation/run works smoothly.

Rename JFrame form

Rename JFrame file created in previous test suite to MyFrame

Select Refactor > Rename and click on Refactor.

EXPECTED RESULT:The file is renamed and compilation/run works smoothly.

Test suite: Project operations

Purpose: Test Delete, Move and Rename of Maven projects

Rename project

Rename WebAppPrj JEE5 Webapp (war) project to MavenWebAppPrj

EXPECTED RESULT:Rename succeeds, the project is compilable.

Move project

Move MavenWebAppPrj to another location

EXPECTED RESULT:The project is moved properly and compilation/run works smoothly.

Delete project

Delete MavenWebAppPrj

EXPECTED RESULT:The project is deleted but sources will remain.

Delete project along with sources

Do previous scenario with checkbox enabled

EXPECTED RESULT:The project is deleted along with its sources.

Test suite: Maven related options

Purpose: Test maven related optins

Set up External Maven Home

Go to Tools > Options > Java > Maven

Set up the Maven external home by Browse button

EXPECTED RESULT:The used maven version can be checked by building of a project - it is written in the output like following line:NetBeans: Executing '/space/maven/2.0.9/apache-maven-2.0.9/bin/mvn install'.

Set up Skip Tests

Go to Tools > Options > Java > Maven

Check Tests for any build executions not related to testing

Build any project without tests

EXPECTED RESULT:No tests are run during project testing-check in Output tab.