Forum Discussion

wmtan01's avatar
wmtan01
Contributor
6 years ago
Solved

Maximizing TestComplete to build efficient scripts

Hi everyone,

 

We're starting to increase the number of people handling TestComplete scripts in our company and I just wanted to read/know about how people develop their cases in TestComplete. I came across this interesting post (https://community.smartbear.com/t5/TestComplete-General-Discussions/Non-standard-ways-of-using-TestComplete-for-building-test-cases/m-p/133021#M24816) from long ago and would like to have more insights/suggestions from what people do since I'm pretty sure the userbase of the tool has increased over the years.

 

As a background, we are currently using a data driven approach to testing, one test case scenario is one row in a data loop. Basically an actual test case accepts one set of test data and does actions based on those. So far it's been working great for us. We build small keyword tests that does one specific job similar to a function described in the post I have indicated above.

 

It makes it easier to make new scenarios/test cases for new features that comes in; drag and drop keyword tests that have been developed before, make new ones to do actions/checkpoints for new feature and voila a new regression case for the new feature is born. Before I hand this off and share this practice to more people in the team I have a few questions which I've had difficulty answering by myself and wanted to get people's opinions. So here they are:

 

1. Is it more efficient to make smaller keyword tests (as granular as possible, i.e one to fill up the subject field of an email reply) rather than making midsize keyword tests (i.e. one keyword test that fills up subject, body, signature, recipeints of an email reply)? This question leads to a long term dilemma I've been having with our project, is it better to have 10 KWTs each one doing small parts with no overlap of scope or is it better to have 1 KWTs doing a big chunk of work?

 

2. Is scripting more efficient than using KWTs? I've read some posts/approaches where they use KWTs to handle data, leveraging the data driven loops and data tables one can inject inside a KWT but the building blocks of test cases are all scripts, basically a KWT calling scripts per step. Right now we're leaning heavily on making KWTs the building blocks but having someone with scripting experience make complement scripts that "empowers" the KWTs.

 

3. Is there a proper way of making test data tables? We've been slowly moving away from 100 column tables where each of those columns are used to have both checkpoint data and configuration data needed to determine a scenario. The way we've been doing it the past few months was to split the big data table to smaller ones having specifc purpose for each (i.e. one for user info/permissions, one for languages available, etc.) and using "keys" from the main table to look for the necessary content in the smaller tables. 

 

If there are other posts that have discussed this, I would be interested in knowing about them. Thanks!

  • Here's my take on that:

     

    Selenium, while good, you have to do EVERYTHING in code... I mean, EVERYTHING.  Object identification, building classes, wrapping things for a unit test to include in some testing tool, etc.  EVERYTHING.

     

    TestComplete:

    ObjectIdentifciation -> NameMapping

    Classes -> Code units/KWT

    Unit tests -> Test items, projects, etc

    Reports/Logs -> TestComplete logging

     

    A lot of the stuff you have to do manually in Selenium, TestComplete has built in.  

     

    Other advantage: Selenium is web only.  So, if you need to mix your tests between Desktop, API, Mobile, and Web, you need multiple tools.  TestComplete allows you to do ALL of them in one tool...or incorporate a few other tools into that one tool.  That Web Store that I mentioned above?  That was half of the pipeline of a ticket transaction.  There were reports, fulfillment, access control scanning, etc., done by other application platforms including desktop, kiosk, and mobile.  So, TestComplete allowed an all-in-one tool.

     

    Finally... Selenium is open source... which means that if you need support... well, you can hope you find the right guy in the right forum who knows what they're doing.  TestComplete has this space and their own dedicated customer service staff.  

     

    Again.. my opinion... others may vary but hopefully this helps in your decision processing.

5 Replies

  • EPDelta's avatar
    EPDelta
    New Contributor

    Just had a thought: the project file is from my Team Lead, who is using ReadyAPI to build his projects.

     

    Are project files cross-compatible between SoapUI Open Source and ReadyAPI?

     

    Thanks.

    • richie's avatar
      richie
      Community Hero

      Hey EPDelta 

       

      Creating projects in ReadyAPI! and running them in opensource SoapUI shouldn't be a problem unless the ReadyAPI! project includes pro (licensed) functionality (e.g. data driven functionality, event handling, composite projects, etc.)

      HOWEVER - if you're able to open the ReadyAPI! project from within SoapUI, then that atleast proves it's not a composite project.

      If there's other licensed functionality like the data driven functionality, you'll see the datadriven items disabled in your test case.

       

      socket exceptions are typically related to the networking protocol TLS/SSL - if it mentioned SSL in the error response I'd switch from HTTP to HTTPS or back again which is typically the thing that catches me out when I get socket exceptions.

       

      HOWEVER - I think you have another problem and I don't think it's related to the version of SoapUI you're using.

       

      You mention you haven't altered the XML - I'm guessing you mean the payload content in the SOAP Service API and the associated test steps - right?

       

      You then mention that you added in Basic Auth - and I can see you've got an Authorization header and a base64 encoded value (which will be an encode of your username and password), HOWEVER - if you're Test Lead didn't have basic auth set on the API, then it isn't required and adding it won't work.

       

      Connection reset typically means something fundamental is wrong with your setup and so either your message isn't getting to the endpoint at all or it's getting there in such an unexpected condition your endpoint doesnt recognise it (and I don't mean payload when I say unexpected condition - I mean something more basic).

       

      The fact it runs on your Test Leads machine leads me to think you shouldn't have to edit the project at all.

       

      The problem is a setting local to your machine - I'd ask your Test Lead to check the 'WSDL Settings', 'SSL Settings' and the 'Proxy Settings' (within the ReadyAPI! Preferences) to see what he's got in there.  I'd also ask him for a copy of his hosts file just in case you're trying to hit an endpoint that's resolved locally to his machine.

       

      Can you confirm what the authentication type is being used for your SOAP service?  It's definitely not Basic Auth as the project doesn't already have it in - but you'll need this configured properly, however as I mention above - I think it's something fundamental and local to your machine - so I'd compare the global settings (mentioned above) you've got set in SoapUI against your Test Lead's settings in ReadyAPI!

       

      ta

       

      rich   

      • linehammer's avatar
        linehammer
        Frequent Visitor

        Connection reset simply means that a TCP RST was received. This happens when your peer receives data that it can't process, and there can be various reasons for that. The simplest is when you close the socket, and then write more data on the output stream. By closing the socket, you told your peer that you are done talking, and it can forget about your connection. When you send more data on that stream anyway, the peer rejects it with an RST to let you know it isn't listening.