Forum Discussion

heidi_n's avatar
heidi_n
Regular Contributor
8 years ago

Training Videos for Scripted Tests?

Are there training videos for scripted tests specifically (not recorded)? I looked at the following videos, but they were focused on "recorded/keyword" tests. We will be scripting in JavaScript for desktop/web.

 

https://support.smartbear.com/testcomplete/videos/?utm_source=TestComplete&utm_medium=StarterPage

- Your First Automated Test Script - Mobile

- TestComplete Desktop Tour - Recorded

https://support.smartbear.com/screencasts/testcomplete/creating-your-first-test/
- LESSON 1: CREATING YOUR FIRST AUTOMATED TEST SCRIPT WITH TESTCOMPLETE - Recorded Not Scripted

  • NisHera's avatar
    NisHera
    Valued Contributor

    I wonder whether one can produce a common training for test scripting.  Because scripting is so much versatile and flexible you could write so many ways to solve same problem. For pure scripting you can use W3School tutorial which is very good.

    https://www.w3schools.com/js/

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Generally speaking, writing an automated test using Script code is, at the basic level, the same as writing a test in Keyword tests.  On-Screen actions in keyword tests are method calls in script code.   For example, this:

       

      is the same, in JavaScript, as 

       

      function test(){
          Aliases.browser.MyPage.checkboxTest.ClickChecked(true);
      }

      When I first started doing this stuff back in the day, 16 years ago, I had a rudimentary knowledge of OO Pascal programming (Turbo Pascal 6, for those of you old dogs). What I did was a LOT of recording as DelphiScript to see how the actions I wanted to have happen showed up as script code.  I then did a LOT of trial and error learning, reading online documents for Delphi syntax and techniques.  The hurdle that I had was not so much in getting tests written out in script code (recording works just as well in script code as it does in keyword tests) but in actually turning those recordings into reusable, modularized, object oriented code structures.  For that, any general Delphi training was sufficient.

       

      As mentioned, for JavaScript, definitely look up the W3 schools stuff.  There are similar sites out there for Delphi, Python, JScript, C#, etc.  If you already have keyword test knowledge, then your learning curve is the code language, not necessarily the automation techniques.

       

      While a training class for scripting might be helpful, it would probably turn out to be more a training of the code language of choice than any automation techniques.