Hi i am new to cactus and when i am using tomcat5.1 and have included all the necessary jars. But when i am trying to execute it, it is showing the error,

Error : "javax.servlet.ServletException: Failed to load test suite [SampleTest], Reason is [Class not found "SampleTest"] "

Please let me know what the problem is??

2

There are 2 best solutions below

0
On BEST ANSWER

If you are trying to run the Quick Start tutorial from the Cactus web site, I believe it no longer works.

Here's a mention in the release notes of 1.8.1.

    Release Notes - Cactus - Version 1.8.1

    Bug

    * [CACTUS-124] - Cannot run the Servlet Example

I get the same error message with version 1.7.x.

I just started researching this product, so I'll post an answer if I find one. Hopefully someone else will have an answer with the extra info I have provided.

EDIT:
Found a work around. Looks like it's an issue with package names. I re-compiled the two files using the default/no package and it worked.

EDIT 2:
I looked up CACTUS-124 in the bug database and it's not related. Also I believe only the class files that extend ServletTestCase need to be changed to the default/no package name.

1
On

You need to include the package ie:

http://localhost:8080/myapp/ServletTestRunner?suite=common.TestEverything

Would run the suite TestEverything in the common package.