Saturday, August 2, 2014

Reverse Engineering in NetBeans and TestCases

NetBeans 7.1

  • Open NetBeans.
  • Tools > Plugins > Settings > Add
  • Name : UML
  • URL :
  • In Available Plugins, tick "UML" and click on install button.
  • After installation, restart Netbeans.
  • Right click on project package name(Here sample)
  • You will see "Reverse Engineering" in the drop down
  • Select it -> Click on OK
  • A Model folder gets created
  • Inside it go to Model->package name(Here sample)
  • Right Click on package name.
  • Choose Create diagram from selected elements option
  • Choose the diagram type you want. I selected Activity Diagram.
  • Click on Finish.
  • A prompt dialog appears. Click on Yes.
  • You can now view Activity Diagram for your project.
  • Likewise you can generate other diagrams.

Test Cases:

1. JUnit : Visit Link
Right Click on package name and select New->JUnit Test->Finish.
This will create JUnit test file. Right click on the file and select Test File.
It will produce the test result as follows.

Note : If you don't find JUnit option, install the plugin  by searching in
Tools->Plugins->Available Plugins

2. Functional & Regression Testing with TestNG :
If plugin is not installed, then visit link and click on Download.
Extract the downloaded file. We can view 3 nbm file.
Go to NetBeans.
Go to Downloaded->Add Plugins->"add those 3 files except maven.nbm"->Install.
Restart NetBeans.

Right Click on package name and select New->TestNG Test->Finish.
This will create TestNG test file. Right click on the file and select Test File.
It will produce the test result as follows.

3. Load Generator or JMeter or Stress Testing or Volume Testing :
Right Click on package name and select New->JMeter Test->Finish.
This will create JMeter test file. Right click on the file and select Test File.

4. Smoke Testing :
The results of this testing is used to decide if a build is stable enough to proceed with further testing.

5. Sanity Testing :
A sanity test or sanity check is a basic test to quickly evaluate whether a claim or the result of a calculation can possibly be true.

6. Usability testing :
It involves a completely different set of skills and is a subjective form of evaluation, because it depends on the user population that will use the application. Results obtained in this way should not be generalized to other situations and users outside those in the test population.

7. Capacity Testing :
In short, capacity testing is about figuring out what the capacity of the system under test is. Typically, how many transactions per minute or how many simultaneous users a system can bear without crashing.

8.  Recovery Testing :
Examples of recovery testing:
While an application is running, suddenly restart the computer, and afterwards check the validness of the application's data integrity.

9. Reliability Testing :
You have to explain about NetBeans and how it supports reverse engineering with formula
Probability = Number of failing cases / Total number of cases under consideration

10. Ad-hoc testing :
Testing without knowledge of actual system to check functionality.
Ad hoc or regression testing is done after fixing defects to check functionality.

11. Black-Box testing:
If the source code is not available then test data is based on the function of the software without regard to how it was implemented. When performing a black box test, a tester will interact with the system's user interface by providing inputs and examining outputs without knowing how and where the inputs are worked Manually testing

White-Box testing :
The tester needs to have a look inside the source code and find out which unit/chunk of the code is behaving inappropriately. eg:Junit

No comments:

Post a Comment

Mesmerizing Fortnight

This time its Sangli,Satara & Kolhapur. We hate to spend our daytime in journey so we prefer night journey. Unfortunately trains f...