What is a Component?
A business component is the basic building block of scriptless test automation. It provides the ability to quickly and easily build a test case by breaking down the flow through your business application, one step at a time. In its most basic sense, a business component represents an individual application screen.
The component contains test automation steps, or instructions, that map to each and every object on that screen.
Typically with test automation, test scripts and record/playback tools only work with the objects on the screen that are being used at any one given time.
Therefore, automated tests are specific to that particular “path” through the application. With a business component, you can create something that can be used and reused every single time your test flows through that screen.
Why is this important?
By creating components for each application screen as you walk through your business process test flow, you can create a library of components that represent all objects on every screen you touched; therefore, these components can be assembled into an infinite number of test cases. You can also add steps to the component that handle verifying that you’re on the correct screen and manage how your data is handled for each step.
A tool like TurnKey’s cFactory™ (which stands for ‘component factory’) makes the creation of components extremely fast and easy. Each field on the screen has:
- an item name
- a keyword that performs a certain action
- a parameter used to display it in a dataSheet™ so that you can perform the operation on that field
Keywords are the root of scriptless automation. These are the operations that can be performed on an object such as enter data into a particular field, searching for a row or column in a table, or validating something that is displayed in the field.
For example, in a login field, you typically want to enter a value, your login ID. This is the root of scriptless test automation. Having the ability to create business components through cFactory™ allows for individuals with no scripting or programming skills whatsoever to be successful at building automated tests.
Another benefit to creating components is that not only can you address all objects on the screen at once, but you can also do things like set up steps that verify you are on the correct screen, capture output from the browser, and then click a Next or Save button to process the data and go on to the next screen in the business flow.
But wait – there’s more!
The most important benefit to “componentization” is that when something changes in your application, you don’t have to throw away the entire test script which is typically the problem with path-based tests. Because components represent all the objects on a single screen, you can narrow down the maintenance you need to do only to those components or screens that have changed.
cFactory not only shows you all the changes side-by-side (the old vs. the new screen items, keywords and parameters), it allows you to select the changes that you want to keep – or accepts all changes. It’s your choice.
cFactory™ will also automatically go to all of the test scripts that use the changed component, as well as the datasheet where you enter data for those component fields, and automatically updates these for you. A few clicks of the button and all your updates are handled. We call it Evergreen-Automation™.
With the daily need for expanding test coverage without compromising the quality of your testing, and the rapid changes of applications, you’re better off creating business components for all your test automation.
Turnkey also provides out-of-the-box business component libraries for SAP, Oracle, PeopleSoft, Salesforce, among many others. Turnkey’s Accelerators™ are organized, structured, pre-tested, and easy to maintain and configure for automating testing of your business applications and make good economic sense.
In the rapidly changing landscape of quality assurance testing let’s face it…we could all use an “easy button.”