Knowledge Base Article

Home Page > Knowledge Base > Rapise

Home Page > Knowledge Base > Rapise > Rapise Desktop

Home Page > Knowledge Base > Rapise > Rapise Mobile

Home Page > Knowledge Base > Rapise > Rapise Web

Article Using Global.DoLoadObjects to Use Rapise Objects from External File

by Adam S on Wednesday, January 6, 2016

One of the challenges using an automated testing tool is to organize things in a way that it is logical enough to find something quickly, structured enough to avoid duplication and simple enough to maintain and upgrade.

This statement is also true for Rapise objects. A common requirement is to deal with the same objects within a flow of different test cases. For instance, if an application has “Log In” functionality then many, many tests will require logging-in and logging-out. Each test will have this object in its own object tree. However this causes trouble if a change in the application affects the recognition of the Log In object. All of the test cases will need to be updated. In such situations it is much more convenient to have the “Log In” objects placed into their own file and re-used by other tests.

One of the approaches that may be used in Rapise is to maintain several .sstest responsible for different screens or forms in the application. Each .sstest will have own object tree. Now each test case may dynamically load a combination of object trees and deal with them in some sequence. Here is where Global.DoLoadObjects may be useful:

Please, note that in this example we assume that all tests are stored in the same folder, so accessing object files requires “..\<other test name>” prefix.

We attach another example for this topic. It demonstrates loading objects from Rapise SubTests. Basically SubTests are similar to other tests but usually stored in the subfolder of the current test. Each sub test contains objects of different types and loads them on demand.

Attachments
Article Info
Last Updated: 1/6/2016
Article ID: KB185
# Views: 628
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.