Contributions
Picking a random row from a dataset as part of a test
TestComplete has the ability to drive tests using a data source (Excel, CSV, datbase, etc), and there is a Data Loop option built in if you need to repeat the same steps for all the rows in a dataset. Data Driving a Test Case in TestComplete However, there may be times when you don't need to loop through all the data in a dataset and just want to pick one at random. This is a guide showingan example using JScript. Similar functionality is available for other scripting languages as well,with slightly different syntax. 1.) Define your data You can use a pre-defined data source for this, or TestComplete's built-in data generation wizard. In this case I'm using the data generation wizard to create 10,000 random names for me to pick from. This creates a Table variable, and that can be stored in a single Keyword test or with an entire Project. Data Generator Wizard 2.) Create a second variable as an integer to store the random number 3.) In the test, use the Set Variable Value to assign that integer a random number between 1 and the total number of rows in that table. In my case 10,000. Use the Code Expression option for the mode. This example works in JScript, if your Project is in another scripting language the syntax here would need to be adjusted. 4.) Use that integer variable to select a row of your table and return the value, that can be used in the test steps. Related Forum Post: Generating random string values (A - D) & select from dropdown8.1KViews4likes9CommentsRe: Web Testing in Desktop Module
Hi Nebsta, Anything involving a web browser does require the web module for TestComplete to work with it. TestComplete does have cross-browser testing capabilities built into that module, so a test recorded in one browser can be played back in another. Cross-Browser Testing Thanks, Dan692Views2likes0CommentsRe: Running Tests every Night on new Build
Hello abrar22, There's no place in the command line interface to specify a time, it will run whenever you send the command. There are many tools out there that can be used to send a command at a certain time, including QAComplete (which I linked before) or even Windows Task Scheduler. Windows Task Scheduler is included in Windows. -Dan3.2KViews0likes0CommentsRe: Running Tests every Night on new Build
Hello Abrar22, There are a few ways to do this, including command line, our integration with Jenkins, or through a test management tool like QAComplete for scheduling. TestComplete Command Line: https://support.smartbear.com/viewarticle/69415/ Integration With Jenkins: https://support.smartbear.com/viewarticle/73663/ QAComplete: https://smartbear.com/product/qacomplete/overview/ Thanks, Dan3.2KViews2likes2CommentsRe: If Then vs. Checkpoint?
Hi Heidi, Depending on the type of checkbox you're working with, you may not need to add any logic at all. For example, when I work with a Windows checkbox and check off an item, this is what gets recorded: This action can be played back and will work regardless if the checkbox is already checked or not. So I would suggest trying that first, if that doesn't work you can use an If...Then statement. If…Then Operation -Dan918Views3likes0CommentsRe: Spy in web browser
Hi tyrus, If you're using the latest version of Firefox or Chrome then I would suggest upgrading to the latest version of TestComplete (currently 11.2). More details in the links below, but that upgrade will likely solve the issue. Preparing Firefox for Web Testing Preparing Chrome for Web Testing -Dan932Views1like0CommentsRe: Storing the value of property object
TestComplete does have an operation available to store an object's property value. The short video below goes over how to do this in a Keyword test. Once that's recorded you can convert the Keyword test to script and it will show you how to do the same thing in the syntax of your Project's scripting language. Setting a variable value from on screen: http://screencast.com/t/vBL2Twwozz1.1KViews0likes0Comments