Qtp-or-types
提供:Dev Guides
QTP-オブジェクトリポジトリタイプ
コンテキストに基づいて、オブジェクトリポジトリには2つのタイプがあります。
ローカルオブジェクトリポジトリ
名前が示すように、オブジェクトリポジトリはそのアクションにのみ適用できます。 ご存じのように、QTPはデフォルトで1アクションの新しいテストを作成します。 ローカルオブジェクトリポジトリは、リソース→オブジェクトリポジトリに移動して開くことができます。 これはQTPのデフォルトのORです。
共有オブジェクトリポジトリ
オブジェクトリポジトリはアクション/モジュール全体で共有され、2つ以上のアクションにマップされます。 [ローカルオブジェクトのエクスポート]オプションを使用すると、ローカルオブジェクトをエクスポートして、共有オブジェクトリポジトリに保存できます。 共有オブジェクトリポジトリは、リソース→オブジェクトリポジトリマネージャーに移動して開くことができます
ローカルORと共有ORの主な違いは次のとおりです。
Local Object Repository (LOR) | Shared Object Repository (SOR) |
---|---|
This Object Repository is available; one for each action. | This type of OR is available for multiple tests and for multiple actions. |
This is the OR that is available for each tests, by default. | This type of OR is usually used in frameworks considering reusability and maintainability. |
Local Object Repository is editable in Object Repository. | Shared Object Repository is read-only by default but can be edited in Object Repository Manager. |
It is NOT a standalone file that can edited. | SOR is a standalone file that can be edited easily. |
It is saved with an Extension .bdb | SOR is saved with an extension .tsr |
It should be used when not many tests are working on the same screens of the application under test. | SOR Should be used when there are different scripts interacting with the same type of the object. |