1 2 >   Sort: Date

What Articles Have You Read about JUnit
What Articles Have You Read about JUnit? There are a number of JUnit articles that you should read: "JUnit Primer" by Clarkware Consulting, Inc.. This article demonstrates a quick and easy way to write and run JUnit test cases and test suites. "JUnit FAQ" by Mike Clark. A collection of requently ask...
2008-01-09, 8100👍, 0💬

How To Wirte a Simple JUnit Test Class
How To Wirte a Simple JUnit Test Class? This is a common test in a job interview. You should be able to write this simple test class with one test method: import org.junit.*; // by FYICenter.com public class HelloTest { @Test public void testHello() { String message = "Hello World!"; Assert.assertEq...
2008-01-11, 7781👍, 0💬

What CLASSPATH Settings Are Needed to Run JUnit
What CLASSPATH Settings Are Needed to Run JUnit? It doesn't matter if you run your JUnit tests from a command line, from an IDE, or from "ant", you must define your CLASSPATH settings correctly. Here is what recommended by the JUnit FAQ with some minor changes: To run your JUnit tests, you'll need t...
2008-01-15, 6139👍, 0💬

How Do You Uninstall JUnit?
How Do You Uninstall JUnit Uninstalling JUnit is easy. Just remember these: Delete the directory that contains the JUnit JAR file and other JUnit files. Remove the JUnit JAR file from the CLASSPATH environment variable. No need to stop any background processes, because JUnit does not use background ...
2008-01-17, 6059👍, 0💬

How To Compile a JUnit Test Class
How To Compile a JUnit Test Class? Compiling a JUnit test class is like compiling any other Java classes. The only thing you need watch out is that the JUnit JAR file must be included in the classpath. For example, to compile the test class HelloTest.java described previously, you should do this: ja...
2008-01-11, 6019👍, 0💬

How Do I Run JUnit Tests from Command Window
How Do I Run JUnit Tests from Command Window? To run JUnit tests from a command window, you need to check the following list: 1. Make sure that JDK is installed and the "java" command program is accessible through the PATH setting. Type "java -version" at the command prompt, you should see the JVM r...
2008-01-17, 6001👍, 0💬

How do I install JUnit? First I will download the lastest version of JUnit.
How do I install JUnit? First I will download the lastest version of JUnit. Then I will extract all files from the downloaded file. The most important file should be the JUnit JAR file: junit-4.4.jar, which contains all JUnit class packages. To verify junit-4.4.jar, I will run the org.junit.runner.J...
2008-01-09, 5999👍, 0💬

How To Run a JUnit Test Class
How To Run a JUnit Test Class? A JUnit test class usually contains a number of test methods. You can run all test methods in a JUnit test class with the JUnitCore runner class. For example, to run the test class HelloTest.java described previously, you should do this: java -cp .;junit-4.4.jar org.ju...
2008-01-15, 5935👍, 0💬

Where Do You Download JUnit?
Where Do You Download JUnit? Where do I download JUnit? I don't think anyone will ask this question in a job interview. But the answer is simple. You should follow the download instructions from the JUnit official Website: JUnit.org.
2008-01-07, 5853👍, 0💬

What Is the "@SuiteClasses" Annotation?
What Is the "@SuiteClasses" Annotation? "@SuiteClasses" is a class annotation defined in JUnit 4.4 in org.junit.runners.Suite.SuiteC lasses.It allows you to define a suite class as described in the previous question. By the way, the API document of JUnit 4.4 has a major typo for the org.junit.runner...
2008-01-31, 5678👍, 0💬

Do You Know the Book "JUnit in Action"
Do You Know the Book "JUnit in Action"? You should know this book. It received some good reviews. Title: JUnit in Action Publisher: Manning Publications (October 1, 2003) Author: Vincent Massol, Ted Husted Abstract: A guide to unit testing Java applications (including J2EE applications) using the JU...
2008-01-07, 5673👍, 0💬

What Is JUnit
What is JUnit? You need to remember the following points when answering this question: It is a software testing framework to for unit testing. It is written in Java and designed to test Java applications. It is an Open Source Software maintained by the JUnit.org community. Answer from the JUnit FAQ:...
2008-01-02, 5057👍, 0💬

What Is JUnit TestCase?
What Is JUnit TestCase? JUnit TestCase is the base class, junit.framework.TestCase, used in JUnit 3.8 that allows you to create a test case. TestCase class is no longer supported in JUnit 4.4. A test case defines the fixture to run multiple tests. To define a test case Implement a subclass of TestCa...
2008-02-26, 5041👍, 0💬

How To Run a "@Suite.SuiteClasses" Class in JUnit 4.4?
How To Run a "@Suite.SuiteClasses" Class in JUnit 4.4? If you define create "@Suite.SuiteClasses" class as described in the previous question, you run it with the core runner: org.junit.runner.JUnitCore: java -cp .;junit-4.4.jar org.junit.runner.JUnitCore AllTests JUnit version 4.4 ....E.E Time: 0.0...
2008-01-31, 5036👍, 0💬

How Many Test Runners Are Supported in JUnit 3.8?
How Many Test Runners Are Supported in JUnit 3.8? JUnit 3.8 supports 3 test runners: junit.textui.TestRunner - A command line based tool to run tests. TestRunner expects the name of a TestCase class as argument. If this class defines a static suite method it will be invoked and the returned test is ...
2008-03-04, 5026👍, 0💬

Why Not Just Use System.out.println() for Unit Testing?
Why Not Just Use System.out.println() for Unit Testing? Inserting debug statements into code is a low-tech method for debugging it. It usually requires that output be scanned manually every time the program is run to ensure that the code is doing what's expected. It generally takes less time in the ...
2008-02-12, 5006👍, 0💬

What Is JUnit TestSuite?
What Is JUnit TestSuite? JUnit TestSuite is a container class, junit.framework.TestSuite, used in JUnit 3.8 that allows you to group multiple test cases into a collection and run them together. TestSuite class is no longer supported in JUnit 4.4. Each test runs in its own fixture so there can be no ...
2008-03-04, 4949👍, 0💬

How To Write a JUnit Test Method
How To Write a JUnit Test Method? This interview question is to check if you know the basic rules about writing a JUnit test method: You need to mark the method as a JUnit test method with the JUnit annotation: @org.junit.Test. A JUnit test method must be a "public" method. This allows the runner cl...
2008-01-22, 4929👍, 0💬

Who Should Use JUnit, Developers or Testers
Who Should Use JUnit, Developers or Testers? I should say that JUnit is mostly used by developers. JUnit is designed for unit testing, which is really a coding process, not a testing process. But many testers or QA engineers, are also required to use JUnit for unit testing. For example, I found this...
2008-01-02, 4810👍, 0💬

Do You Need to Write a Test Class for Every Class That Need to Be Tested?
Do You Need to Write a Test Class for Every Class That Need to Be Tested? This is a simple question. But the answer shows your organization skills. The technical answer is no. There is no need to write one test class for each every class that need to be tested. One test class can contain many tests ...
2008-02-26, 4779👍, 0💬

Under What Conditions Should You Test set() and get() Methods?
Under What Conditions Should You Test set() and get() Methods? This is a good question for a job interview. It shows your experience with test design and data types. Tests should be designed to target areas that might break. set() and get() methods on simple data types are unlikely to break. So no n...
2008-02-12, 4734👍, 0💬

Do You Know the Book "JUnit Recipes: Practical Methods for Programmer Testing"
Do You Know the Book "JUnit Recipes: Practical Methods for Programmer Testing"? You should know this book. It received some good reviews. Title: JUnit Recipes: Practical Methods for Programmer Testing Publisher: Manning Publications (July 15, 2004) Author: J. B. Rainsberger, Scott Stirling Abstract:...
2008-01-03, 4732👍, 0💬

Under What Conditions Should You Not Test Get() and Set() Methods?
Under What Conditions Should You Not Test Get() and Set() Methods? The JUnit FAQ provides a good answer to this question: Most of the time, get/set methods just can't break, and if they can't break, then why test them? While it is usually better to test more, there is a definite curve of diminishing...
2008-02-19, 4724👍, 0💬

Why Not Just Write a main() Method for Unit Testing?
Why Not Just Write a main() Method for Unit Testing? It is possible to write a main() method in each class that need to be tested for unit testing. In the main() method, you could create test object of the class itself, and write some tests to test its methods. However, this is not a recommended app...
2008-02-06, 4688👍, 0💬

1 2 >   Sort: Date