Software testing is the process of investigating an application and finding errors in it. The difference between testing and simply exploring is that testing involves comparing the application output to an expected standard and determining whether the application functions as expected. In other words, the tester may need not only to ensure that the application displays a list of values, but also to verify that the list contains the appropriate values.
So, the basic test sequence includes –
- Defining the expected output.
- Performing test actions (feeding the appropriate input).
- Gathering the application output and comparing it to expected result (baseline data).
- Notifying developers or managers if the comparison fails.
Automated testing is the automatic execution of software testing by a special program with little or no human interaction. Automated execution guarantees that no test action will be skipped; it relieves testers of having to repeat the same boring steps over and over.
TestComplete provides special features for automating test actions, creating tests, defining baseline data, running tests, and logging test results. For example, it includes a special “recording tests” feature that lets you create tests visually. You just need to start recording, perform all the needed actions against the tested application, and TestComplete will automatically convert all the “recorded” actions to a test. TestComplete also includes special dialogs and wizards that help you automate comparison commands (or checkpoints) in your tests.
Test Types
TestComplete supports various testing types and methodologies, for example:
- Functional and GUI testing
- Unit testing
- Regression testing
In this tutorial, we will create a functional test — the kind that is used most often. Functional tests check the interface between the application on one side and the rest of the system and users on the other side. They verify that the application functions as expected.
A typical functional test consists of test commands that perform various actions such as simulating clicks and keystrokes, running test commands in a loop, and verifying object contents.
In TestComplete, functional tests can be created in the form of keyword tests and scripts. Tests of both kinds can be recorded or created from scratch. Creating keyword tests is visual, easy and does not require a programming background. Scripting requires understanding script commands, but gives you the ability to create more powerful and flexible tests. TestComplete supports scripting in:
- JavaScript,
- Python,
- VBScript,
You can create scripts in the language you know best.
TestComplete Projects and Project Items
TestComplete operates with test projects and project suites. A project is a starting point for creating tests. It contains your tests, baseline data for checkpoints, information about tested applications, and other items needed to perform testing. The project also defines the execution sequence of tests.
A project can contain all the tests for your application. For complex applications, you may choose to devote a project to just one part of the application and other projects to other parts (normally, modules).
You can group related projects into a project suite. TestComplete automatically generates a project suite when you create a new project. You can also create an empty project suite and add projects to it.
Project items are project elements that perform or assist in performing various testing operations. Besides project items, your projects can also include helper files like Excel or .csv files with test data.
TestComplete User Interface
The TestComplete user interface is organized into a number of panels:
- Project Explorer (on the left of the window) shows the contents of projects and the project suite. It also provides access to test logs.
- Work place is your working desktop: the contents of editors, in which you create and edit tests and view test results, are shown in the Workspace panel. For example, in the image above you can see the Keyword Test editor opened in the Workspace.
- Below the editor, there is a Test Visualizer panel that shows images captured by the test engine during recording of test commands. These images help you understand the actions which test commands perform.
- Watch list, Locals, Break point and Call Stack panels are used for test debugging. The To Do panel manages a list of tasks to be done.
- The Object Browser shows contents that are available for all projects – the list of all processes, windows and controls, and mobile devices that exist in the system and are available to the test engine. All these objects form a tree of hierarchy that matches the actual hierarchy of objects in applications. When you record tests, TestComplete captures user actions as actions over these objects, their properties and methods.