Reputation: 19607
What is the most commonly used approach used for testing in Java projects (iterative development) ?
Upvotes: 6
Views: 1941
Reputation: 189
My Suggestion for testing of the java project is to keep it simple.
Steps :- Manual Testing :-Achieve a stable product. Automation Testing :- Maintain the quality of the product. Report Generation and reporting :- Let people know the quality of the product. Continuous Integration :-Make it a complete automated,continuous tool.
When developer will commit the Functionality then Start testing the it module by module.Try to compare the Actual Output with the expected output and against that Log the issues.
When developer resolved with the issues,Start with the Integration Testing and also start testing the resolved state issues and check whether any regression occur due to issue Fixing.
At last when product become the stable one,Then start for automating the the modules. You can also follow automation step by step like:- 1.Automating the modules. 2.Report generation and send mail for product HealthCheck. 3.Continuous Integration and Automation testing on private server on local machine.
Upvotes: 0
Reputation: 4916
My suggestion is that you should have a healthy mix of automated and manual testing.
AUTOMATED TESTING
Unit Testing
Use NUnit to test your classes, functions and interaction between them.
http://www.nunit.org/index.php
Automated Functional Testing
If it's possible you should automate a lot of the functional testing. Some frame works have functional testing built into them. Otherwise you have to use a tool for it. If you are developing web sites/applications you might want to look at Selenium.
http://www.peterkrantz.com/2005/selenium-for-aspnet/
Continuous Integration
Use CI to make sure all your automated tests run every time someone in your team makes a commit to the project.
http://martinfowler.com/articles/continuousIntegration.html
MANUAL TESTING
As much as I love automated testing it is, IMHO, not a substitute for manual testing. The main reason being that an automated can only do what it is told and only verify what it has been informed to view as pass/fail. A human can use it's intelligence to find faults and raise questions that appear while testing something else.
Upvotes: 9
Reputation: 706
In the order of most commonly used approach:
on the theoretical side there are loads of ways to properly test the code. If you are looking for something practical take a look at Clean Code Talk. Take a look at the whole series, about 5 talks (can't post more than one link).
Upvotes: 2
Reputation: 2735
On the premise of doing testing at all, I would say that testing with JUnit is the common approach to do testing in Java.
Although most tests are written with JUnit mostly tests tend to be more integration tests than unit tests. (meaning not testing one thing in isolation but some things together)
Additionally test are mostly not written in a test first approach but in parallel or after a specific feature has been implemented.
If you go to a team that makes more advanced use of testing you might probably find some CI Server (Cruise Control, Hudson) running the tests at least once a day during a nightly build.
Upvotes: 2
Reputation: 636
Personal experience would suggest the most popular approach is none at all.
Upvotes: 7
Reputation: 98469
Unit testing?
Contract-based programming, a la Eiffel?
Waterfall model?
Different shops do different things. If there were one method to rule them all, you wouldn't be asking this question.
Upvotes: 2
Reputation: 19392
I've worked with TDD (Test Driven Development) before, and my feelings towards it are mixed. Essentially, you write your tests before you write your code, and write your code to satisfy the requirements of the test. TDD forces you to have an extremely clear idea about your requirements prior to starting. An added benefit is that, once you are done development, assuming you followed closely to TDD procedures, you'd have a complete set of test suites to go with the code. The down side is that it takes an extremely long time, and at times, you'd just want to skip a couple of steps (e.g. maybe writing code before tests like a sane person would prefer to do).
More can be read here (wiki link)
Upvotes: 4