How can I run Junit test case on Selenium RC
I created a test case using Selenium IDE and exported it to Junit. When I run my TestCase1.java file I get the following errors and so I am not able to proceed.
C:\Program Files\java\jdk1.5.0_06\bin>javac c:\acceptance-tests\TestCase1.java
c:\acceptance-tests\TestCase1.java:1: package org.openqa.selenium.server does no exist import org.openqa.s开发者_如何学编程elenium.server.RemoteControlConfiguration; ^ c:\acceptance-tests\TestCase1.java:2: package org.openqa.selenium.server does not exist import org.openqa.selenium.server.SeleniumServer; ^ c:\acceptance-tests\TestCase1.java:3: package com.thoughtworks.selenium does not exist import com.thoughtworks.selenium.*;and
When I attempt to run Junit tests on Selenium RC, I get the following message:
"package junit.framewo rk.Test does not exist import junit.framework.Test.*;"You need to add both the Selenium Client Drivers and JUnit library files to your classpath. You can get these from http://www.seleniumhq.org and http://www.junit.org
When running tests through JUnit you need to connect to a running Selenium RC server. You can start the server programmatically or run the selenium-server jar. Both of these methods are documented here.
精彩评论