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.

Can I run WebKing from the command line?

LegacyForum
LegacyForum Posts: 1,664 ✭✭
Currently, We have an automated build process and like to integrate it with WebKing (from the command line) to check its web accessibility. So, I have the following questions:
1. Can I run WebKing from the command line? And how can I do it?
2. Can I run WebKing on Installshield? And how can I do it?

It would be nice if you can also send me some references. Thanks.

Jack

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    edited May 2004
    Hi Jack,

    1. Can I run WebKing from the command line? And how can I do it?

    Yes, WebKing can be run from the command line and has a number of features available when doing so. For example (excerpted from the WebKing Manual)

    open mywebsite.wkj
    refresh
    checkwebstandards
    checklinks
    savereport -checkwebstandards mywebsite_code.rpt
    savereport -checklinks mywebsite_links.rpt
    saveproject
    closeproject

    This script tells WebKing to perform the following tasks:

    1) Open mywebsite.wkj (a previously saved project file).
    2) Refresh the project.
    3) Run Check Web Standards to check the project's HTML, JavaScript, CSS, and VBScript/ASP.
    4) Check the project's links.
    5) Create a binary-format report of the Check Web Standards results and save it as mywebsite_code.rpt.
    6) Create a binary-format report of the Check Links results and save it as mywebsite_links.rpt.
    7) Save the mywebsite project.
    8) Close the mywebsite project.

    To run the above script, the command line would look like:

    CODE
    UNIX: webking -cmd -genreport -run <scriptname>
    Windows: wk.exe -cmd -genreport -run <scriptname>

    In your case you would probably just need a call to Check Web Accessibility, rather than Check Web Standards or Check Links.

    2. Can I run WebKing on Installshield? And how can I do it?

    I'm not certain what you mean here, but you may be looking for a GUI testing tool. WebKing is strictly a web-based testing product, and so it could not test an InstallShield GUIs. Parasoft is in the process of developing a GUITest which may be able to address your problem. GUITest is currently in the Beta phase. I'm looking into the GUITest release ETA and whether it will check Accessibility.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Also, for more information on how to use WebKing on the command line, see "Running WebKing from the Command Line" (pages 184-204). There the manual goes into great detail over the options available from the command line.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Thanks for your response, and I will give a try.
    Btw, where can I get a copy of the WebKing manual?
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    edited May 2004
    A pdf of the manual can be downloaded at:

    http://www.parasoft.com/jsp/products/home....King&itemId=111

    The link for the manual is to the left in the link menu. You will need to register if you have not already registered at the Parasoft.com website.


    In regards to my previous post, GUITest has an estimated release date of autumn this year. GUITest does not currently test GUI accessibility, but the feature list is still open and it will be discussed.


    Good luck and feel free to come to the forums with any other WebKing related inquiries.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    I got the manual and was able to run WebKing from the command line now. Thanks for all your help.

    I also have a few quick questions abou the static analysis,
    1. What types of files does static analysis tool check? I know it checks HTML and JSP files as I can see it finds errors against these files in the report.
    2. Is there a way (such as log file) for me to tell how much time it takes to finish static analysis?

    Thanks.

    Jack
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Hi jack, sorry for the delay (things have been busy here).

    1. What types of files does static analysis tool check? I know it checks HTML and JSP files as I can see it finds errors against these files in the report.

    Static Analysis applies to CSS, HTML, Javascript, VB, WSDL, and XML files. For the most part, Static Analysis treats JSP files as HTML files with JSP-script embedded in it (making it the opposite of how jsp files are understood by the compiler), though static JSP-includes (JSP-includes that don't require processing of the JSP) are supported. PHP and ASP files are treated in much the same way, though their support is currently slightly more limited than JSP files.

    What is considered CSS, HTML, Javascript, etc is dependant on how you have configured WebKing. For example, you may want to indicate that .inc files are actually HTML. Once you have configured WebKing accordingly, it will treat all .inc files as HTML. You can configure these settings under File: Customize Preferences: MIME Types.

    Obviously, not all parts of Static Analysis apply to all type of files. For example, a CodeWizard with only CSS rules would only be used to check CSS files.

    2. Is there a way (such as log file) for me to tell how much time it takes to finish static analysis?


    There is an "echotime" command that will cause WebKing to print the current time while running a command-line script.

    From the manual:

    Displays the amount of time that elapses between specified points in the script. This command should be used in pairs: add one echotime command at the beginning of the process whose time you want to track, and another at the end. The first echotime command reads the Epoch time. Subsequent echotime commands read the Epoch time and report (in parentheses) how much time has elapsed since the previous time reading. Elapsed time is reported in milliseconds; to convert it to seconds, divide by 1000.

    (p. 127)

    So, using the script mentioned earlier in this topic, you could do the following:

    CODE
    open mywebsite.wkj
    refresh
    echotime
    checkwebstandards
    echotime
    checklinks
    savereport -checkwebstandards mywebsite_code.rpt
    savereport -checklinks mywebsite_links.rpt
    saveproject
    closeproject

    This script would then print out the current time before running "Check Web Standards" and then print out the current time again, plus the amount of time elapsed since "Check Web Standards" began.

    Hope that helps out!