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.

Command line and project tree

Options
LegacyForum
LegacyForum Posts: 1,664 ✭✭
Is it possible to run a test from the command line on a specific part of the project tree? In my project I have several Eclipse plugins which I test against other plugins (eg for broken links from one plugin to another) and I need to test each plugin separately. This is easy enough from the GUI, but can it be done from the command line?

Thanks

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    Hi,

    You can create a test suite of tests; each test is to run the tool against a specific part of the project tree. Inside a test suite, you can leave the tests that you would like to run enabled, and disable the rest of them. You then can run the test suite from the command line.
    For more information, please see the following help topics:
    - Running WebKing From the Command Line
    - Using Test Suites for Advanced Functional Testing
    - Managing the Test Suite
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    Hi,

    Thanks for your reply. I created a test suite and that worked fine, but the results for all the tests end up in the same report. I need to see the results for each test separately, but there doesn't seem to be a way to do that - I can't run a test individually from the command line because the runTest command acts on the entire test suite.

    I thought about adding a Write File tool to the end of each test, but it doesn't seem to be available for the tests that I am running (standard Check Links, Check Accessbility and Check Spelling).

    Do you have any other suggestions?

    By the way, could you please tell me what the selecttarget command does, as it sounds like something I might be able to use? I can find no mention of it in the documentation.

    Thanks for your help!
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    Hi,

    In order for you to be able to attach a Write File tool to Check Links, Check Accessibility, and Check Spelling tools, create your test suite, but instead of choosing Existing Tool, select New Tool instead. This will create a new tool just for that test that may be customized without modifying the default tools, including the ability to add outputs to the tools such as the Write File tool.

    In order to create the Check Accessibility tool, create a new Coding Standards tool. Then selet the tool and click the Add Rules button, browse to /rules/ and select the accessibility ruleset you'd like to use for the tool.

    As for the selecttarget command, could you please elaborate on where you are seeing this command.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    Hi,

    Thanks for the update. The only downside to that method is that I get a text file, rather than the XML or HTML file I could have got from the GUI. I now need to write something to convert the text file into HTML ( It would be easier if I could just run a command line tool on part of the project tree.

    I saw the selecttarget command in the output from 'wk -cmd -dump':

    C:\PROGRA~1\Parasoft\WebKing\5.1>wk -cmd -dump
    Available actions:
    Set: TestSuite
    + runTest
    Set: RuleWizard
    + createenforcer
    Set: Project
    + closeproject
    + saveproject
    + refresh
    + publish
    + synchronize
    + pathtree
    + expandpaths
    + newproject
    + projecttree
    + selecttarget
    + deselecttarget
    + savereport
    + mailreport
    Set: File
    + open
    + exit
    + saveprefs
    + setoption
    Set: Script
    + setpathdepth
    + setanchor
    + sethost
    + echotime
    + echomemory
    + waitfor
    + sleep
    + execpython
    + execpythonfile
    + execjavascript

    C:\PROGRA~1\Parasoft\WebKing\5.1>


    Thanks