Menu

Test all links...

2002-07-04
2002-07-05
  • Network simulator

    How can you test that all links on a website
    are valid with JXWeb??

    Does anyone has an example??

     
    • Thomas.P.Varghese

      Its a sample code testing the validity of the links on a webpage. This may be a crude way of achieving the results but I hope this may be a starting point.

      <jxw>
              <set name="req" value="http://localhost:8080/index.html"/>
          <httpGet response="response1"/>

          <getLink text="JSP Examples" response="response1"/>
          <httpGet response="response2"/>   

          <ifEqual converse="true" name="respText" file="OrginalJsp.html">
              <save name="respText" file="jsp_response.html"/>
              <fail>Orginal Jsp is not orginal</fail>
          </ifEqual>
         

          <getLink text="Servlet Examples" response="response1"/>
          <httpGet response="response3"/>   

          <ifEqual converse="true" name="respText" file="OrginalServlet.html">
              <save name="respText" file="servlet_response.html"/>
              <fail>Orginal Servlet is not orginal</fail>
          </ifEqual>

          <getLink text="WebDAV capabilities" response="response1"/>
          <httpGet response="response4"/>   

          <ifEqual converse="true" name="respText" file="OrginalWebDAV.html">
              <save name="respText" file="Webdev_response.html"/>
              <fail>Orginal WebDAV is not orginal</fail>
          </ifEqual>
      </jxw>

      Greetings!
      Thomas

       

Log in to post a comment.