You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The AI Assistant is an LLM-powered chatbot that can create tests and data sources for you. See The AI Assistant for more information about accessing the AI Assistant. Be aware that LLMs can provide inaccurate information, which can affect this feature. Due diligence is recommended.

Creating Tests with the AI Assistant

You can use the AI Assistant to help you create tests in SOAtest. Just ask it for help creating a test and provide it with a URL to a OpenAPI/Swagger service definition that you want to create a test for. It will analyze the service definition and suggest possible scenarios. You can choose one of its suggestions or describe the scenario you want to test yourself. For example, you might ask the AI Assistant:

Create a test scenario from definition: 
https://parabank.parasoft.com/parabank/services/bank/openapi.yaml

Test scenario steps:
Log in, get customer accounts, create account, deposit funds, get account

The AI Assistant will show you the test it created based on your request, including a scenario with related steps and populated payload data when applicable, and ask you if you want to save it. You can choose to accept the test it proposes or ask for changes. For example, you might decide you want to add a step to withdraw funds to your test scenario. When it asks you if you want to proceed, you could say:

Add a step to withdraw funds

The AI Assistant would recreate the test with the new step. In this way, you can modify the test until you have exactly what you want.

Smart test templates (.stt) will be automatically applied, when applicable, during test creation by the AI Assistant. These templates can help optimize test scenarios by automatically applying configurations, such as authentication settings or assertions. See About Smart Test Templates for more information.

The AI Assistant can also create a data source for you as part of test creation and even parameterize it. Mention either of those tasks in your conversation to be sure it knows what you want. See Creating Data Sources with the AI Assistant and Applying Parameterization with the AI Assistant for more information and examples.

Creating Data Sources with the AI Assistant

You can use the AI Assistant to create data sources. Data sources are automatically created as CSV file data sources and can be created independently or as part of the test the AI Assistant is helping you create. The AI Assistant will populate the data for you with realistic values and present them to you for your review and approval. For example, you might ask:

1. Generate a data source of fictional climbing expeditions to the Seven Summits. 
2. Create columns: climber, year, mountain, continent, outcome, notes.
3. Create 10 rows.

This will create a simple data source filled with fictional but realistic data. You might also give the AI Assistant more guidance to get a more customized response, like:

1. Generate a data source of historical climbing expeditions to the Seven Summits, based on publicly available records from reputable sources.
2. Select well-known climbers and their expeditions from historical records.
3. Refer to historical facts from credible books, articles, and websites.
4. Create columns: climber, year, summit, outcome, challenges faced, environmental factors, demographics (nationality, age), expedition type, logistics, highlights / notes.
5. Provide a column with links for more information.
6. Create 20 rows.

The AI Assistant will show you the data source it creates based on your request and ask you if you want to save it. You can choose to accept the data source is proposes or ask for changes. For example, you might decide you don't need the "challenges faced" column. When it asks you if you want to proceed, you could ask:

Create the same data source without the challenges faced column

The AI Assistant would recreate the data source without that column. In this way, you can modify the data source until you have exactly what you want.

Applying Parameterization with the AI Assistant

The AI Assistant can parameterize applicable portions of a test for you as part of test creation. If you want the AI Assistant to help you with parameterization, do it as part of test creation; it can't parameterize an existing test. It will most likely not suggest parameterization on its own, so if you want its assistance with this, ask it to help with parameterization and be specific about what should be parameterized. For example, you could tell the AI Assistant the following:

1. Create a test scenario from definition:
	- http://localhost:8080/pda/api-docs/v1
2. Use the following test scenario steps:
	- Create a new category, add items to it, verify the item, delete the item, delete the category, verify categories
3. Parameterize the test scenario with a data source with the following criteria:
   a. Create columns: categoryName, categoryDescription, categoryImagePath, itemsName, itemsDescription, itemsInStock, itemsImagePath
   b. Generate a random integer for itemsInStock between 1-100
   c. Be creative
   d. Generate 5 rows


  • No labels