facebook

Strutstestcase using MyEclipseIDE [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Comments
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #216880 Reply

    Hi,

    I’m trying to use StrutsTestCase using MyEclipseIDE. While test cases for other classes, such as dto’s work fine, I can’t manage to get the StrutsTestCase get to work.
    The problem is that the getActionServlet() method fails. Some investigation on the internet showed that this is a problem with the classpath that has to be set to my WEB-INF directory.
    However, I just don’t see how I can set the classpath to a directory that doesn’t contain any jars. Setting the classpath in my system environment variable didn’t help either.

    Is there a way to set the classpath, or to bypass this problem ?

    many thanks,

    Bartlebooth

    #216892 Reply

    Riyad Kalla
    Member

    Moving to Random Thoughts (this is an Eclipse question):

    Also, can you edit the Run target for your Struts test case, click on the Classpath tab, click Advanced, select “Add external folder” and hit OK? See if that works.

    #217169 Reply

    Perfect ! Exactly what I was looking for. Thanks a lot.

    Bartlebooth

    #217177 Reply

    Riyad Kalla
    Member

    Glad it worked.

    #237041 Reply

    HexUzHoNG
    Member

    you also have try:

    setContextDirectory(new File(“WebRoot”)); // WebRoot is default web module name.

    at setUp() method.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Strutstestcase using MyEclipseIDE [Closed]

You must be logged in to post in the forum log in