Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||
In this section:
OverviewSQL data sets are added to TDA when SQL responders are created from database recordings
. SQL data sets are made up of one or more SQL templates, which are parameterized SQL statements that represent a set of data. You can review and interact with the data so that it can be used across testing scenarios.
Data Repository ViewClick on a repository in the Data tab to open the data repository view. SQL data sets appear in the SQL Data Sets column. You can perform the following actions in the data repository view. Downloading a Data SetYou can download the data set as a JSON file.
Deleting a Data SetChoose Delete from the ellipses menu and confirm that you want to remove the data set when prompted. If the data set contains record types that do not reference or are not referenced by another component, you can enable the Delete orphaned record types option to ensure that the data set is completely removed. Opening the SQL Template ViewClick on a data set in the SQL Data Sets column to open the SQL Template View. SQL Template ViewA SQL template is a parameterized query for retrieving data from the database. It represents one or more SQL statements that point to the data. Click on a SQL data set to view the templates that were used to query the SQL database. You can perform the following actions. Editing the JDBC URLThe SQL template view shows the JDBC URL for the first row in the table. If your application under test uses multiple databases, you can edit the JDBC URL to point to another database.
Using the Data Sets Toolbar
Adding SQL TemplatesYou can add, edit, and move SQL templates in the data set.
You can not create a template that queries specific values. Any specific values you add will automatically be converted to parameterized values when you save the template. An error icon will appear if your template references missing parameters. Mouse over the icon to view an error message. You can add the missing parameters or edit the template to fix the problem. See Adding and Modifying Parameters for instructions on specifying parameters for the template. Editing SQL TemplatesClick the ellipsis menu to access the editing functions.
Opening the SQL Parameters ViewClick on a SQL template to access the SQL Parameters View. SQL Parameters ViewA SQL parameter is an identifier for a type of data in the SQL database. Parameters hold result sets that contain the data. The SQL parameters appear as columns in the template table. A SQL parameter is an identifier for a type of data in the SQL database. A template may contain several rows of parameters. The following template contains rows for the "name" parameter matching "Account" and "Transaction." The third column in the table, "Additional Response Delay (ms)," is a SQL responder configuration that allows you to adjust database response times
. You can perform the following actions. Adding SQL Parameters
If you add a parameter column that does not appear in the template, you will see an error icon next to the template, as well as an error icon at the missing parameter column. Mouse over either icon for additional information. Adding a Row of Parameter ValuesA row in a SQL template represents a set of parameter values that can be called based on the SQL template.
Modify Parameter ValuesClick the edit icon to and change the value in the Row # column to move the parameter, as well as change the Additional Response Delay
. When specifying a value for a SQL parameter, you can use the Viewing SQL Result Sets ViewYou can expand rows in the template to view the result sets associated with the SQL query. You can also edit the SQL template clicking the edit button when the template is expanded. Adding and Modifying Result SetsExpand a parameter to view the result sets. New SQL templates will not have a result set. Adding and Deleting Rows and Columns
Downloading Results Set DataYou can download SQL result sets in CSV format. This enables you to save a local copy of the results, make any modifications, and re-upload the changed data.
Uploading Results Set Data
Viewing the SQL Data ModelIf your license includes the data modeling functionality, you can click the Models tab for a visual representation of the data. See SQL Data Sets. |
Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||
このセクションの内容:
概要データベースのレコーディングから SQL レスポンダーを作成すると、TDA に SQL データ セットが追加されます
。SQL データ セットは、1 つまたはそれ以上の SQL テンプレートで構成されます。SQL テンプレートは、データのセットを表すパラメータ化された SQL ステートメントです。複数のテスト シナリオでデータを使用できるよう、データを確認して操作することができます。
Data Repository ビュー[データ] タブでリポジトリをクリックすると、Data Repository ビューが開きます。SQL データ セット列に SQL データ セットが表示されます。 Data Repository ビューでは、以下のアクションを実行できます。 データ セットのダウンロードデータ セットを JSON ファイルとしてダウンロードできます。
データ セットの削除省略記号メニューの [削除] をクリックし、確認ダイアログが表示されたら、データ セットの削除を確定します。他のコンポーネントを参照しておらず、他のコンポーネントから参照もされていないレコード タイプがデータ セットに含まれている場合、[孤立したレコード タイプを削除] オプションをオンにすると、該当するデータ セットが完全に削除されます。 SQL テンプレート ビューを開くSQL データ セット列のデータ セットをクリックすると、SQL テンプレート ビューが開きます。 SQL テンプレート ビューSQL テンプレートとは、データベースからデータを取得するためのパラメーター化されたクエリーです。SQL テンプレートは、データを指し示す 1 つまたはそれ以上の SQL ステートメントを表します。 SQL データベースのクエリーに使用されるテンプレートを参照するには、SQL データ セットをクリックします。 以下のアクションを行うことができます。 JDBC URL の編集SQL テンプレート ビューは、最初の行の JDBC URL をテーブルに表示します。テスト対象アプリケーションが複数のデータベースを使用している場合、別のデータベースを指すように JDBC URL を編集できます。
データ セット ツールバーの使用
SQL テンプレートの追加データ セット内の SQL テンプレートを追加、編集、削除できます。
特定の値をクエリーするテンプレートは作成できません。追加した特定の値は、テンプレートを保存すると、パラメータ化された値に自動的に変換されます。 テンプレートが参照しているパラメーターが存在しない場合、エラー アイコンが表示されます。アイコンにマウスを乗せると、エラー メッセージが表示されます。 不足しているパラメーターを追加するか、テンプレートを編集して問題を修正します。テンプレートのパラメーターの指定手順については、「Adding and Modifying Parameters」を参照してください。 SQL テンプレートの編集編集機能を利用するには、省略記号メニューをクリックします。
SQL パラメーター ビューを開くSQL パラメーター ビューを表示するには、SQL テンプレートをクリックします。 SQL パラメーター ビューSQL パラメーターとは、SQL データベース内のデータのタイプに対する識別しです。パラメーターは、データを含む結果セットを保持します。SQL パラメーターは、テンプレート テーブルの行として表示されます。SQL パラメーターとは、SQL データベース内のデータのタイプに対する識別しです。 1 つのテンプレートに複数のパラメーター行を含めることができます。次のテンプレートには、「name」パラメーターが「Account」に一致する行と「Transaction」に一致する行が含まれています。テーブルの 3 番目の列 [Additional Response Delay (ms)] は、データベースの応答時間を調整するための SQL レスポンダー設定です
。 以下のアクションを行うことができます。 SQL パラメーターの追加
テンプレートにないパラメーター列を追加した場合、テンプレートの隣にエラー アイコンが表示されるほか、存在しないパラメーター列にもエラー アイコンが表示されます。 どちらかのエラー アイコンにカーソルを位置づけると、詳細情報が表示されます。 パラメーター値の行の追加SQL テンプレートの行は、SQL テンプレートに基づいて呼び出すことのできるパラメーター値のセットを表します。
パラメーター値の変更編集アイコンをクリックし、[Row #] 列の値を変更してパラメーターを移動したり、[追加遅延時間] 値を変更したりできます
。SQL パラメーターの値でワイルドカード 結果セット ビューの表示テンプレートの行を展開すると、SQL クエリーに関連する結果セットを参照できます。 また、テンプレートが展開されているときに編集ボタンをクリックすると、SQL テンプレートを編集できます。 結果セットの追加と変更パラメーターを展開して結果セットを参照します。新規 SQL テンプレートには結果セットがありません。 行と列の追加と削除
結果セット データのダウンロードSQL 結果セットを CSV フォーマットでダウンロードできます。これにより、結果のローカル コピーを保存し、任意の編集を加えてから変更済みのデータを再度アップロードできます。
結果セット データのアップロード
SQL データ モデルの参照ライセンスに data modeling 機能が含まれている場合、[モデル] タブをクリックしてデータを視覚的に表示できます。「SQL データ セット」を参照してください。 |
Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||
在本章节中:
概要当从数据库记录创建 SQL 响应程序时,SQL 数据集被添加到 TDA
。SQL 数据集由一个或多个 SQL 模板组成,这些模板是表示一组数据的参数化 SQL 语句。您可以查看数据并与数据交互,以便在测试场景中使用数据。
数据资源库视图单击 Data 选项卡中的资源库,打开数据资源库视图。SQL 数据集出现在 SQL 数据集列中。 您可以在数据资源库视图中执行以下操作。 下载数据集您可以将数据集下载为 JSON 文件。
删除数据集从省略号菜单中选择 Delete ,并确认在提示时要删除数据集。如果数据集包含不引用或其他组件不引用的记录类型,则可以启用 Delete orphaned record types 选项,以确保完全删除数据集。 打开 SQL 模板视图单击 SQL 数据集列中的数据集,打开 SQL Template View。 SQL 模板视图SQL 模板是用于从数据库检索数据的参数化查询。它表示一个或多个指向数据的 SQL 语句。单击 SQL 数据集,查看用于查询 SQL 数据库的模板。 您可以执行以下操作。 编辑 JDBC URLSQL 模板视图显示了表中第一行的 JDBC URL。如果您的测试应用程序使用多个数据库,则可以编辑 JDBC URL 来指向另一个数据库。
使用数据集工具栏
添加 SQL 模板您可以在数据集中添加、编辑和移动 SQL 模板。
不能创建查询特定值的模板。保存模板时,您添加的任何特定值都将自动转换为参数化值。 如果模板引用了丢失的参数,将会出现一个错误图标。将鼠标移到图标上以查看错误消息。 您可以添加缺少的参数或编辑模板来修复问题。有关为模板指定参数的说明,请查阅 Adding and Modifying Parameters 。 编辑 SQL 模板单击省略号菜单访问编辑功能。
打开 SQL 参数视图单击 SQL 模板,访问 SQL Parameters View。 SQL 参数视图SQL 参数是 SQL 数据库中数据类型的标识符。参数保存包含数据的结果集。SQL 参数作为列出现在模板表中。SQL 参数是 SQL 数据库中数据类型的标识符。 模板可以包含几行参数。面的模板包含匹配“Account”和“Transaction”的“name”参数行。表中的第三列"Additional Response Delay (ms),”是一个 SQL 响应程序配置,允许您调整数据库响应时间。
。 您可以执行以下操作。 添加 SQL 参数
如果添加一个不在模板中出现的参数列,则将在模板旁边看到一个错误图标,以及在缺失的参数列上看到一个错误图标。 将鼠标移到其中一个图标上以获取更多信息。 添加一行参数值SQL 模板中的一行表示一组可以基于 SQL 模板调用的参数值。
修改参数值单击编辑图标并更改行 # 列中的值以移动参数,并更改附加的响应延迟
。在为 SQL 参数指定值时,可以使用 查看 SQL 结果集视图您可以在模板中展开行,以查看与 SQL 查询关联的结果集。 还可以在展开模板时单击编辑按钮,编辑 SQL 模板。 添加和修改结果集展开参数以查看结果集。新的 SQL 模板将没有结果集。 添加和删除行和列
下载结果集数据您可以下载 CSV 格式的 SQL 结果集。这使您能够保存结果的本地副本,进行任何修改,并重新上载更改后的数据。
上传结果集数据
查看 SQL 数据模型如果您的许可包含数据建模功能,则可以单击 Models 选项卡以获得数据的可视化表示。查阅 SQL Data Sets。 |