テストケースを生成する
Tosca Agentic テスト自動化 allows you to generate test cases with natural language, based on a secure, responsible AI.これにより、テスト作成が促進され、既存のポートフォリオの最適化に役立ちます。
Tosca Agentic テスト自動化 can help you create new test cases, but it can't update existing ones.
SAP Fioriとウェブアプリケーションを使用してテストを実施することを推奨します。
テストデータファイルを準備する
テストケースを生成する前に、実行可能なテストステップの生成方法をAIに指示するテストデータファイルを作成する必要があります。当社の例をご覧になり、さまざまな形式のテストデータを確認してください。
さらに、作成された手動テストケースを再利用することを検討してください。手動テストケースには、AIの精度を向上させ、曖昧なプロンプトや下手なプロンプトの問題を回避するための組み込み構造があります。手動テストケースをチャットフィールドにコピー&ペーストします。
テストデータファイルのベストプラクティス
テストデータファイルを作成するには、必ず以下を実行してください。
-
明確な目標を規定する:テストデータがテストの具体的な目標に一致し、必要なフィールド、条件、および予想される結果を網羅していることを確認します。
-
現実的なデータを使用する:実際のシナリオを模倣したデータを作成し、実際のユースケースをシミュレートします。これには、通常条件、境界条件、エラー条件が含まれます。
-
完全性を確保する:必要なフィールドに適切な値を入力します。データが欠落している項目は、テストラン中にユーザー入力をリクエストするようAIに促します。
-
関連するフィールドをグループ化する:テストラン中のデータ入力を効率化するために、関連するフィールドを一つのグループにまとめます。例えば、顧客の名前と住所をグループ化します。
-
一貫性を維持する:日付、ID、数値などのフィールドにおいて一定の形式と規則を使用します。
-
テストデータを検証する:テストデータの正確性を確認し、テストシナリオの要件を満たしていることを確保します。
最初のテストケースを生成する
Now that you've prepared your test data, it's time to utilize Tosca Agentic テスト自動化's test generation capabilities.テストケースを生成する際は、以下の2種類のモードから選択できます。
-
Co-create, the default mode, allows you to verify each autonomous step before it's performed, giving you an opportunity to provide Tosca Agentic テスト自動化 with feedback or new instructions before running the test step.
-
Autonomous mode is the standard mode where Tosca Agentic テスト自動化 generates steps in sequence until test generation is completed, without your intervention.
共同作成モードを使用してテストケースを生成するには、以下の手順に従ってください。
- Select Generate a test case in the Tosca Agentic テスト自動化 window.
- テストケースの生成に使用するアプリケーションを選択します。SAP Fioriアプリケーションおよびウェブアプリケーションの使用を推奨します。
- チャットウィンドウの下部で「共同作成」を選択します。
-
Give Tosca Agentic テスト自動化 a prompt that describes what you want to achieve with this test.テストデータを貼り付けるか、テストデータファイルをアップロードします(最大4MBのテキストファイルまたはJSONファイル)。
-
If you're using an SAP Fiori application, Tosca Agentic テスト自動化 will generate a set of work steps.作業手順は編集することも、そのままにしておくこともできます。
-
Tosca Agentic テスト自動化 then describes the first test step it will perform and asks if it should proceed.If you'd like to change something, provide feedback so that Tosca Agentic テスト自動化 can update the test step.
-
Once you give permission to proceed, Tosca Agentic テスト自動化 performs the test step.処理中はマウスを動かさないでください。処理が完了すると、Automationウィンドウに戻るように促すブラウザ通知が届きます。
-
共同作成プロセスを続行し、完了したら、「テストケースを保存」を選択します。新しいテストケースは、テストケースのページにあります。
自律モードを使用してテストケースを生成するには、以下の手順に従ってください。
- In the Tosca Agentic テスト自動化 window, select Generate a test case.
- テストケースの生成に使用するアプリケーションを選択します。SAP Fioriアプリケーションおよびウェブアプリケーションの使用を推奨します。
- チャットウィンドウの下部で「自律」を選択します。
-
Give Tosca Agentic テスト自動化 a prompt that describes what you want to achieve with this test.テストデータを貼り付けるか、テストデータファイルをアップロードします(最大4MBのテキストファイルまたはJSONファイル)。
-
If you're using an SAP Fiori application, Tosca Agentic テスト自動化 will generate a set of work steps.作業手順は編集することも、そのままにしておくこともできます。
-
テストケースの生成を開始してください。
-
テスト対象アプリケーションのウィンドウを最大化します。
-
指示を送信します。
-
マウスから手を離します。Please don't move your mouse while Tosca Agentic テスト自動化 generates test cases.
-
-
When Tosca Agentic テスト自動化 is done, select Save test cases.新しいテストケースは、テストケースのページにあります。
この例では、SAPの販売注文を作成します。
-
SAPアプリケーションを選択します。
-
テストの指示「SAPの販売注文を作成」を出し、テストデータのJSONファイルをアップロードします。
-
「Toscaにインポート」を選択して、テストケースをTosca Cloudにインポートします。
作業ステップを管理する
作業手順は、SAP Fioriアプリケーションでのみ使用できます。
この機能を使用するには、以下の手順に従ってください。
- In the Tosca Agentic テスト自動化 window, select Generate a test case.
- テストケースの生成に使用するアプリケーションを選択し、それがSAP Fioriアプリケーションであることを確認します。
- プロンプトとテストデータを入力します。Tosca Agentic テスト自動化 generates a set of work steps.
- 作業手順を選択して確認します。その後、続行するか編集するかを選びます。編集中は、手順を削除したり、作業手順内のテキストを直接編集したりできます。
- When you're satisfied with the work steps, select
send.
テストデータの例
これらのテストデータの例では、自然言語とJSONの形式がオプションとして提供されています。
自然言語形式
以下の例のテストデータセットは、SAP Fioriアプリケーションおよびウェブアプリケーション向けの自然言語形式を使用しています。
販売注文を作成するとします。このプロンプトをコピーして、チャットのテキストフィールドに直接貼り付けます。
Create Sales orders VA01
テストデータはこちらです。Copy and paste this data into a text file and then upload it to Tosca Agentic テスト自動化.
Screen: Create Sales Documents
Data:
- Order Type: OR
- Sales Organization: 1000
- Distribution Channel: 10
- Division: 00
Screen: Create Standard Order: Overview
Data:
- Sold-to Party: 1175
- Ship-to Party: 1175
- Cust Reference: Test
- All Items table:
- Item: 2
- Material: M-09
- Order quantity: 5
あるいは、発注書を作成したいのかもしれません。このプロンプトをコピーして、チャットのテキストフィールドに直接貼り付けます。
Create purchase order
テストデータはこちらです。Copy and paste this data into a text file and then upload it to Tosca Agentic テスト自動化.
1. Search for 'Create Purchase Order'
2. Click on Dropdown, and Click on the Standard PO
3.Fill in the data for the following fields:
-Vendor: 0010300002
-Purch. Org.: 1010
-Purch. Group: 001
-Company Code: 1010
4. In the first table, fill in the first row the following: Material: SF-FL-FORK-L, PO Quantity: 20, Plnt: 1010
テストデータはこちらです。これをチャットのテキストフィールドに直接コピー&ペーストします。
Step 1: select the Automobile table
Step 2: Enter Vehicle Data
Action: On the Enter Vehicle Data screen, input the following details:
Make: BMW
kW: 120
Date of Manufacture: 06/19/2023
Number of Seats: 5
Fuel Type: Diesel
List Price: 17500
License Plate Number: WU-1234AT
Annual Mileage: 15000
Expected Result: Vehicle data is entered correctly.
Proceed to Insurant Data
Action: Click on the Next » button.
Expected Result: The Enter Insurant Data screen is displayed.
Step 3: Enter Insurant Data
Action: On the Enter Insurant Data screen, input the following details:
First Name: Rywuzdz
Last Name: Cdxtlpg
Date of Birth: 12/12/1989
Gender: Male
Street Address: Teststraße 123
Country: Austria
Zip Code: 1120
City: Wien
Occupation: Employee
Hobbies: Select 'Speeding'
Action: Click on the Next » button.
Expected Result: The Enter Product Data screen is displayed and direct to the next page.
Step 4: Enter Product Data
Action: On the Enter Product Data screen, input the following details:
Start Date: 07/19/2025
Insurance Sum: 15,000,000.00
Damage Insurance: No Coverage
Merit Rating: Bonus 7
Optional Products: Select 'Euro Protection' and 'Legal Defense Insurance'
Courtesy Car: Yes
Expected Result: Product data is entered correctly.
Step 5: Proceed to Price Option Selection
Action: Click on the Next » button.
Expected Result: The Select Price Option screen is displayed.
Step 6: Select Price Option
Action: On the Select Price Option screen, select the 'Platinum' radio button.
Expected Result: 'Platinum' price option is selected.
Step 7: Proceed to Quote Submission
Action: Click on the Next » button.
Expected Result: The Send Quote screen is displayed.
Step 8: Enter Contact and Account Information
Action: On the Send Quote screen, input the following details:
E-Mail: j.snow@tricentis.com
Phone: 004369911223344
Username: jsnow
Password: Password+12
Confirm Password: Password+12
Comments: OSV rocks!
Expected Result: Contact and account information is entered correctly.
Step 9: Submit the Quote
Action: Click on the « Send XML» button.
Expected Result: The quote is submitted successfully.
Step 10: Confirm Submission
Action: In the Confirmation Dialog, click on the OK button.
Expected Result: Submission confirmation is acknowledged.
Step 11: Return to Home
Action: Click on the Tricentis link in the Confirmation Dialog.
Expected Result: Navigated back to the home page.
JSON形式
以下の例のテストデータセットは、JSON形式を使用しており、さまざまな順列やフィールドの種類を網羅しています。Copy and paste this data into a JSON file and then upload it to Tosca Agentic テスト自動化.
{
"Customer Details": {
"Name": "John Doe",
"Contact Number": "123-456-7890",
"Email": "john.doe@example.com"
},
"Order Details": {
"Order Type": "Online",
"Payment Method": "Credit Card"
}
}
{
"Order Items Table": [
{
"Item": 1,
"Product Name": "Widget A",
"Quantity": 2,
"Price": 10.00
},
{
"Item": 2,
"Product Name": "Widget B",
"Quantity": 5,
"Price": 20.00
}
]
}
{
"Order Items": [
{
"Item": 1,
"Product Name": "Widget A",
"Quantity": 1,
"Price": 10.00
}
]
}
{
"Order Items": [
{
"Item": 1,
"Product Name": "Widget A",
"Quantity": 2,
"Price": 10.00
},
{
"Item": 2,
"Product Name": "Widget B",
"Quantity": 5,
"Price": 20.00
}
]
}
{
"Credentials": {
"User": "xxx",
"Password": "xxx"
},
"Test Organizational Data": {
"Order Type": "OR",
"Sales Organization": "1000",
"Distribution Channel": "10",
"Division": "00"
},
"Test Sales Order Data": {
"Sold-To Party": "1175",
"Ship-To Party": "1175",
"Cust. Reference": "Customer Test",
"All Items Table": [
{
"Item": 1,
"Material": "M-09",
"Order Quantity": 5
},
{
"Item": 2,
"Material": "M-09",
"Order Quantity": 10
}
]
},
"Outbound Delivery Data": {
"Shipping Point": 1201,
"Selection Date": "11/21/2026"
}
}