Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Testing Interviews:Analyst TestingAutomationDatabase TestingJSUnitJUnitLocalization TestingManual TestingMobile TestingNetwork TestingQA ConceptsQA TestingQTPQUnitRadar TesterRational TestSuiteSoftware QASoftware TestingTest CasesTest Documents ReportingWebsites Stress TestingWinRunnerWireless Testing
Copyright © 2018. All Rights Reserved
JUnit Interview Question:
What CLASSPATH Settings Are Needed to Run JUnit?
Submitted by: AdministratorIt 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 the following elemements in your CLASSPATH:
* The JUnit JAR file.
* Location of your JUnit test classes.
* Location of classes to be tested.
* JAR files of class libraries that are required by classes to be tested.
If attempting to run your tests results in a NoClassDefFoundError, then something is missing from your CLASSPATH.
If you are running your JUnit tests from a command line on a Windows system:
set CLASSPATH=c:Ajunit-4.4.jar;c:Btest_classes;
c:Btarget_classes;c:D3rd_party.jar
If you are running your JUnit tests from a command line on a Unix (bash) system:
export CLASSPATH=/A/junit-4.4.jar:/B/test_classes:
/C/target_classes:/D/3rd_party.jar
Submitted by: Administrator
To run your JUnit tests, you'll need the following elemements in your CLASSPATH:
* The JUnit JAR file.
* Location of your JUnit test classes.
* Location of classes to be tested.
* JAR files of class libraries that are required by classes to be tested.
If attempting to run your tests results in a NoClassDefFoundError, then something is missing from your CLASSPATH.
If you are running your JUnit tests from a command line on a Windows system:
set CLASSPATH=c:Ajunit-4.4.jar;c:Btest_classes;
c:Btarget_classes;c:D3rd_party.jar
If you are running your JUnit tests from a command line on a Unix (bash) system:
export CLASSPATH=/A/junit-4.4.jar:/B/test_classes:
/C/target_classes:/D/3rd_party.jar
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.