Unable to Generate the HTML report in Junit | Selenium Forum
M
Posted on 23/08/2015
Hi,
I am unable to generate the HTML reports for ant built, in Jnit4, I downloaded all the jar files that are provided by this portal.
below is the error copied from command prompt


Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Vinod>cd\

C:\>cd first

C:\first>ant clean\
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:"C:\Program Files (x86)\
HP\Unified Functional Testing\bin\java_shared\classes";"C:\Program Files (x86)\H
P\Unified Functional Testing\bin\java_shared\classes\jasmine.jar"
Buildfile: C:\first\build.xml

BUILD FAILED
Target "clean\" does not exist in the project "Module8New".

Total time: 0 seconds

C:\first>ant compile
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:"C:\Program Files (x86)\
HP\Unified Functional Testing\bin\java_shared\classes";"C:\Program Files (x86)\H
P\Unified Functional Testing\bin\java_shared\classes\jasmine.jar"
Buildfile: C:\first\build.xml

setClassPath:

init:

clean:
[delete] Deleting directory C:\first\build

compile:
[echo] making directory...
[mkdir] Created dir: C:\first\build
[echo] classpath------: E:\jars\SaxonLiaison.jar:E:\jars\commons-beanutils-
1.8.0.jar:E:\jars\derbyclient.jar:E:\jars\dom4j-1.1.jar:E:\jars\eclipselink-2.0.
0.jar:E:\jars\flash-selenium.jar:E:\jars\javax.persistence-2.0.0.jar:E:\jars\log
4j-1.2.14.jar:E:\jars\logging-selenium-1.2.jar:E:\jars\mail.jar:E:\jars\mysql-co
nnector-java-5.0.7-bin(2).jar:E:\jars\poi-3.6-20091214.jar:E:\jars\poi-ooxml-3.6
-20091214.jar:E:\jars\poi-ooxml-schemas-3.6-20091214.jar:E:\jars\saxon-8.7.jar:E
:\jars\selenium-java-client-driver-sources.jar:E:\jars\selenium-java-client-driv
er-test-sources.jar:E:\jars\selenium-java-client-driver-tests.jar:E:\jars\seleni
um-java-client-driver.jar:E:\jars\selenium-server-coreless.jar:E:\jars\selenium-
server-sources.jar:E:\jars\selenium-server.jar:E:\jars\testng-xslt-maven-plugin-
test-0.0.jar:E:\jars\testng.jar:E:\jars\validation-api-1.0.0.GA.jar:E:\jars\xmlb
eans-2.3.0.jar
[echo] compiling...
[javac] C:\first\build.xml:79: warning: 'includeantruntime' was not set, def
aulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to C:\first\build
[javac]
[javac] WARNING
[javac]
[javac] The -source switch defaults to 1.8 in JDK 1.8.
[javac] If you specify -target 1.5 you now must also specify -source 1.5.
[javac] Ant will implicitly add -source 1.5 for you. Please change your bui
ld file.
[javac] warning: [options] bootstrap class path not set in conjunction with
-source 1.5
[javac] warning: [options] source value 1.5 is obsolete and will be removed
in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed
in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use
-Xlint:-options.
[javac] C:\first\src\tests\Login.java:3: error: package org.junit does not e
xist
[javac] import org.junit.Test;
[javac] ^
[javac] C:\first\src\tests\Login.java:6: error: cannot find symbol
[javac] @Test
[javac] ^
[javac] symbol: class Test
[javac] location: class Login
[javac] 2 errors
[javac] 4 warnings

BUILD FAILED
C:\first\build.xml:79: Compile failed; see the compiler error output for details
.

Total time: 0 seconds

C:\first>

M
Replied on 23/08/2015

"[javac] import org.junit.Test;"

your program can not find jar file for junit.

keep junit jar files in same folder as the selenium.