QueryCAT Logo
Search 5,000,000+ questions and answers.

Frequently Asked Questions

How do I run JUnit using Ant?

JUnit FAQ
lt;property name="src" value="./src" /> <property name="lib" value="./lib" /> <property name="classes" value="./classes" /> <property name="test.class.name" value="com.xyz.MyTestSuite" /> lt;path id="test.classpath"> <pathelement location="${classes}" /> <pathelement location="/path/to/junit.jar" /> <fileset dir="${lib}"> <include name="**/*.

What CLASSPATH settings are needed to run JUnit?

JUnit FAQ
If attempting to run your tests results in a NoClassDefFoundError, then something is missing from your CLASSPATH.

Why do I get a NoClassDefFoundError when trying to test JUnit or run the samples?

JUnit FAQ
Also consider running WhichJunit to print the absolute location of the JUnit class files required to run and test JUnit and its samples.

What is JUnit?

JUnit FAQ
JUnit is a simple, open source framework to write and run repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. JUnit features include:

How is JUnit licensed?

JUnit FAQ
JUnit is Open Source Software, released under IBM's Common Public License Version 0.5 and hosted on SourceForge.

How do I install JUnit?

JUnit FAQ
Test the installation by running the sample tests distributed with JUnit. Note that the sample tests are located in the installation directory directly, not the junit.jar file. Therefore, make sure that the JUnit installation directory is on your CLASSPATH. Then simply type:

How do I run an ant task twice, against two different phases?

FAQs-1 - Maven User - Codehaus
You can specify multiple execution elements under the executions tag, giving each a different id and binding them at different phases.

How can I sign jars using Ant?

Unofficial Java Web Start/JNLP FAQ
Use the signjar task: <signjar jar="<yourjar.jar>" storepass="<store_password>" alias="<youralias>" keystore="<keystore>" keypass="<key_password>" /> If you package your jars in a Web Archive (.war), you can use Vamp's Ant Task Suite to sign your jars. You can find Vamp's Ant Task Suite at http://www.vamphq.com/ant.html

How can I use ant to run a Java application?

FAQ on ANT Building Process by Roseanne Zhang, Java Programm...
lt;target name="run" depends="some.target,some.other.target"> <java classname="${run.class}" fork="yes"> <classpath> <path refid="classpath" /> </classpath> <jvmarg line="${debug.jvmargs}" /> <jvmarg line="${my.jvmargs}" /> <jvmarg value="-Dname=${name}" /> <jvmarg line="${run.jvmargs}" /> <arg line="${run.args}" /> </java> </target>

Why does JUnit only report the first failure in a single test?

JUnit FAQ
Reporting multiple failures in a single test is generally a sign that the test does too much, compared to what a unit test ought to do. Usually this means either that the test is really a functional/acceptance/customer test or, if it is a unit test, then it is too big a unit test. JUnit is designed to work best with a number of small tests. It executes each test within a separate instance of the test class. It reports failure on each test.

How to do c/c++ build by using ant?

FAQ on ANT Building Process by Roseanne Zhang, Java Programm...
By the way, I did all my native build by myself on 4 different operating systems. It is quite hack of work. You basically need to know how to do it without ant, then put them in ant to automate the process. Even I've not used ant-contrib cc task yet, but from rough look at the doc, I guess what I said would be still true.

What kinds of programs can I run using Sandboxie?

Sandboxie - Frequently Asked Questions
In all cases on this list, your client-side program is exposed to remote software code, which could use the program as a channel to infiltrate your system. By running the program sandboxed, you greatly increase the control you have over that channel.

a. What do fire ant stings look like?

Imported Fire Ant - FAQ
This high resolution photograph (194K) illustrates the pustules that may result the day after being stung. Each pustule represents a separate sting.

How can I treat fire ant stings?

Imported Fire Ant - FAQ
Immediately after being stung, wash off the area with alcohol, try not to scratch it so it doesn't get infected . Sometimes a white pustule will form the second day, but it will eventually be resorbed. Commercial preparations such as StingEze, etc will numb the area for a while. A thick paste of baking soda and water can also help right after the sting. Careful application of ice will help decrease pain, but can burn the skin if left on too long. Meat tenderizer can also burn the skin.

Why do you call it Ant?

Apache Ant - Frequently Asked Questions
According to Ant's original author, James Duncan Davidson, the name is an acronym for "Another Neat Tool". Later explanations go along the lines of "ants do an extremely good job at building things", or "ants are very small and can carry a weight dozens of times their own" - describing what Ant is intended to be. Initially, Ant was part of the Tomcat code base, when it was donated to the Apache Software Foundation.

What is the ant?

Frequently Asked Questions
the ant is registered as a charitable trust under the Religious And Public Charitable Trusts Act in Bongaigaon, Assam.. It is a voluntary agency (also called a non-governmental organisation or NGO) working towards rural development without prejudice to caste, creed, religion, gender or tribe.

Why do I get 0% coverage when I run my tests and then a reporter from the same instance of Ant?

Frequently Asked Questions
This occurs because Clover hasn't had a chance to flush coverage data out to disk. By default Clover flushes coverage data only at JVM shutdown or when explicitly directed to (using a inline directive). The simplest thing to do is to use the fork="true" attribute when running your tests. The tests will be then run in their own JVM, and the coverage data will be flushed when the that JVM exits. Alternatively, you can use interval-based flushing by changing the Flush Policy.

How to run JMeter test plan programatically, such as from an Ant script?

JMeterFAQ - Jakarta-jmeter Wiki
Answer: Quick answer, go here: http://www.programmerplanet.org/ant-jmeter/. I have permission from the author of this ant task to add it to JMeter's distribution, which I will do as soon as I have the time. (It should now be in the extras folder).

Anthill OS FAQ Q: How do you specify an Ant target to run for your build or publish script?

AnthillPro: Anthill OS FAQ
You would specify a target by making the value of "anthill.build.ant.params" or anthill.publish.ant.params the target name.
More Questions >>

© Copyright 2007-2012 QueryCAT
About • Webmasters • Contact