Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

What kind of Pages are tested webking?

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited March 2008 in Ask a question
Do they include the dynamically generated pages from javascripts?
Hi, I started using webking recently in order to run tests related to web accessibility issues on a web application which runs on an application server.

Now the url to access this application is something like this:

http://localhost:9080/<app_name>/

I need to run webking tool and test for web accessibility issues on the above url. So I use the Static Analysis tool and give in the above url.

The problem is that the pages that are rendered by the clicks of buttons within this application have the same url as mentioned above. This is because these pages are being dynamically generated as a result of javascripts.

These files which come up at the clicks of buttons are files with .mod extension. (they are nothing but html files but used as Modules. Hence, the .mod) All these .mod files bear the same url as mentioned above

So, the question is:

Does webking take into account these kind of files as well? Does it include the dynamically generated files from javascripts also when it scans from the start url?

If not, is there a method to feed in these mod files separately? (Also, is it possible to feed in the mod files from my local disk and scan it for web accessbility issues?)

Please do give me your views on this.

Would be more than happy to provide you with any information you require considering this.

Thanks a lot in advance.

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Hello Bharath,

    The default settings in WebKing associates the .mod extension as having the MIME type of application/xml-dtd. This will prevent you from running Static Analysis on files with the .mod extension that contain HTML. To change this default behavior and run Static Analysis on your .mod files you will have to modify WebKing's default settings to associate your extension (.mod) with the text/html MIME type as follows:
    1) Click on File->Customize Preferences
    2) Select MIME Types on the left panel
    3) In the right panel, scroll through the MIME Types and select "application/xml-dtd"
    4) Selecting "application/xml-dtd" you should see mod listed as one of it's "Extensions"
    5) Remove mod from the "Extensions" for the "application/xml-dtd" MIME Type
    6) Scroll down the MIME Types and select "text/html"
    7) Add mod to the "Extensions" for the text/html MIME Type
    8) Click OK
    9) Restart WebKing

    Once this is complete, you will be able to use the Static Analysis tool for .mod files on a local folder or on any site through the New Project Wizard. To scan a local folder, click on the File tab (if this is not visible you will need to click View->Show File Viewer), select the local folder you would like to check, then click the Static Analysis button on the toolbar (or Tools->Static Analysis).

    If all of your mod files are generated as HTML code from the button clicks in previous pages, then running Static Analysis during the scan of your site should include the dynamically generated files as well since WebKing's scan operates on the HTML output by your site. To scan your site (hosted either locally or remotely) and simultaneously run Static Analysis:
    1) Click File->New->Project
    2) Scan HTTP/FTP/Local resources, click Next
    3) In the SOURCE tab either enter the Start URL or Local Path (depending on whether your site is hosted locally or remotely)
    4) In the same SOURCE tab, you may also need to adjust the Loading depth (how many levels of links up from the root the scan should include) and the allowable/restricted URLs. For more information, please refer to the documentation (Fundamental Tasks and Concepts->Building a Project->New Project Wizard->Creating New Projects from HTTP/FTP/Local Resources)
    5) Click Next
    6) Check the box to Run Static Analysis and enable the tool references you would like to run (Check Links/Check Spelling/Check Web Accessibility/Check Web Standards, etc)
    7) Click Finish

    Please let me know if you have further questions.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭

    Hello Bharath,

    The default settings in WebKing associates the .mod extension as having the MIME type of application/xml-dtd. This will prevent you from running Static Analysis on files with the .mod extension that contain HTML. To change this default behavior and run Static Analysis on your .mod files you will have to modify WebKing's default settings to associate your extension (.mod) with the text/html MIME type as follows:
    1) Click on File->Customize Preferences
    2) Select MIME Types on the left panel
    3) In the right panel, scroll through the MIME Types and select "application/xml-dtd"
    4) Selecting "application/xml-dtd" you should see mod listed as one of it's "Extensions"
    5) Remove mod from the "Extensions" for the "application/xml-dtd" MIME Type
    6) Scroll down the MIME Types and select "text/html"
    7) Add mod to the "Extensions" for the text/html MIME Type
    8) Click OK
    9) Restart WebKing

    Once this is complete, you will be able to use the Static Analysis tool for .mod files on a local folder or on any site through the New Project Wizard. To scan a local folder, click on the File tab (if this is not visible you will need to click View->Show File Viewer), select the local folder you would like to check, then click the Static Analysis button on the toolbar (or Tools->Static Analysis).

    If all of your mod files are generated as HTML code from the button clicks in previous pages, then running Static Analysis during the scan of your site should include the dynamically generated files as well since WebKing's scan operates on the HTML output by your site. To scan your site (hosted either locally or remotely) and simultaneously run Static Analysis:
    1) Click File->New->Project
    2) Scan HTTP/FTP/Local resources, click Next
    3) In the SOURCE tab either enter the Start URL or Local Path (depending on whether your site is hosted locally or remotely)
    4) In the same SOURCE tab, you may also need to adjust the Loading depth (how many levels of links up from the root the scan should include) and the allowable/restricted URLs. For more information, please refer to the documentation (Fundamental Tasks and Concepts->Building a Project->New Project Wizard->Creating New Projects from HTTP/FTP/Local Resources)
    5) Click Next
    6) Check the box to Run Static Analysis and enable the tool references you would like to run (Check Links/Check Spelling/Check Web Accessibility/Check Web Standards, etc)
    7) Click Finish

    Please let me know if you have further questions.


    Hey thanks for that Input!!

    I am currently putting all the files I need to scan (mod, HTML files) into a folder and then running the static analysis tool on the local folder. This serves my purpose.

    Thanks again!