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.

webking not using newest saved version of script file

LegacyForum
LegacyForum Posts: 1,664 ✭✭
I have a Method test which uses a javascript file that contains my method. However, WebKing frequently does not use the most recently saved version of the file. The file is saved and closed, yet WebKing still tries to execute the script before the latest revisions - it is still failing at runtime on a line of code that i fixed.

How can i get WebKing to recognize that i updated and saved the file?

thanks

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    I would suggest trying the following:

    1) Try copy pasting your text from the javascript file into the text input in the editor, and run it that way.
    2) Delete your current method test and create a new one that points to the javascript file, then run it and verify if it still shows failures indicative of unsaved changes.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭

    I would suggest trying the following:

    1) Try copy pasting your text from the javascript file into the text input in the editor, and run it that way.
    2) Delete your current method test and create a new one that points to the javascript file, then run it and verify if it still shows failures indicative of unsaved changes.


    But those two methods wouldn't solve my problem as they would be circumventing the issue in the first place.

    I have figured out that the only way to use a non stale version of the javascript file is to click the drop down button to select the methods available. It seems that the only time WebKing is compiling the .js files is when that drop down buttons is actually clicked. Therefore, if I just save the js file and don't click the drop down, WebKing doesn't recompile the file and uses the stale compiled file.

    Is there any way to not have to do this? ie. is there any way that WebKing can compile the js files when it goes to start running the test?

    thanks a lot
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Unfortunately, SOAtest does need to refresh/reload the javascript file when it's been edited. The approaches I suggested above are for this end, and you also found another way by clicking on the Method dropdown field. This reloads the javascript class and causes Webking to see changes that have been made to the .js file. Basically, you will need to do this before running your test every time you plan to edit the .js file.