# RoostGPT FAQ

# Unit Test FAQ

- 
- 
- How do I generate a unit test?
- What are the programming languages supported by RoostGPT?
- Why do I need to select the language version and the build tool?
- Can I generate a unit test for a single function/method?
- Do I need to provide additional context or information for the Unit Test generation?
- How do I request unit test for a specific language, if it is not listed?
- If my project is not complete, can I still generate Unit Tests?
- Do the tests compile, once generated?
- How do I list the vulnerabilities with my code?

# API Test FAQ

**While running RoostGPT CLI, I get questions, what do they mean?**

```bash
Please enter the alias name for the api spec: weather.yaml: url1_weather
✔ Do you want to provide the url1_weather_BASE_URL for the api spec: url1_weather: (default: Yes). No
✔ Do you want to provide the url1_weather_AUTH_TOKEN for the api spec: url1_weather: (default: Yes). No
```

1. roostGPT supports test generation for multiple API specs. In order to uniquely, alias each api spec there is a default name proposed. It is recommended to just accept that name and proceed
2. the question around BASE\_URL is meant for if the user wants to provide any specific URL to the API server for validating the tests, during the process of generation. You can skip it and roostGPT will spin up a mock API Server, when needed
3. Question around AUTH\_TOKEN or API\_KEY arises from the authentication scheme in the provided API Spec. If provided, it will be used while interacting with the API server provided previously and this can be skipped as well, without any impact to the test generation.
4. If and when a valid API server URL and AUTH token is provided, then it helps validate the tests against a live/real API server instead of a mock server. And this will only affect the internal reports.

**Where can I see the generated Postman collection and test data JSON files?**

```bash
# If running roostGPT locally or through VSCode Extension
# Then switch to your local project folder
cd <LOCAL_PROJECT_FOLDER>
find postman_collections/ -ls

# If running roostGPT with GitOps enabled then look for a PR (Pull Request) in your Git repo
```

# Functional Test FAQ



# UI Test FAQ



# Common Questions

What does this mean?

- **Share Test with Organization:**
    - The test suite configuration will be visible and accessible to other users in the same project.
    - You can view the current project name at the top left header

- **Integration Options - How does this help**? 
    - **Jira**: If there is any associated user story or requirement for your codebase, api-specification then it will be considered by AI model while generating the specific test
    - **Azure DevOps**: If there is any associated user story or requirement for your codebase, api-specification then it will be considered by AI model while generating the specific test
    - **xRay**: Once the test is generated, if there is a Gherkin feature file generated then it can be uploaded to your Test Management Tool. This will create a Test in your central tool.

- **Advanced Options - What is this?**
    - **Roost User Input Type**: This can be a file containing text (like a .docx, .pdf, .txt) or it can be a plain text
    - **Roost User Input File / Text**: Either the file selected (path) OR will be a plain text provided in the input box
    - Similar to the Jira or AzureDevOps ticket, this input will be considered by the AI model while generating the relevant test.

- - **User Language**: If the input is any language other than English, then this option is to be selected.
    - The language provided will be considered for both input as well as output.

- Notifications - When do I get notified?

# Use AWS Bedrock



# Attach Amazon Bedrock permissions to a user or role

1. Select **Users** or **Roles** and then select your user or role.
2. In the **Permissions** tab, choose **Add permissions** and then choose **Add AWS managed policy**. Choose the [AmazonBedrockLimitedAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonBedrockLimitedAccess.html) AWS managed policy.

  
References:

- [https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started-api.html#gs-api-br-permissions](https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started-api.html#gs-api-br-permissions)
- [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonBedrockLimitedAccess.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonBedrockLimitedAccess.html)

# Bedrock Model pricing details

### Anthropic

##### Ireland (eu-west-1)

Geo and In-region Cross-region Inference

<table border="1" id="bkmrk-anthropic-models-pri" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr><th>**Anthropic models**</th><th>**Price per 1,000 input tokens**</th><th>**Price per 1,000 output tokens**</th></tr><tr><td class="align-center">Claude Sonnet 4</td><td class="align-center">$0.003</td><td class="align-center">$0.015</td></tr><tr><td class="align-center">Claude 3.7 Sonnet</td><td class="align-center">$0.003</td><td class="align-center">$0.015

</td></tr><tr><td class="align-center">Claude 3.5 Sonnet</td><td class="align-center">$0.003</td><td class="align-center">$0.015

</td></tr></tbody></table>

A typical RoostGPT Token Usage range across different test-types (as observed with sample tests)

<table border="1" id="bkmrk-test-type-input-toke" style="border-collapse: collapse; width: 100%; height: 148.984px;"><colgroup><col style="width: 36.3528%;"></col><col style="width: 18.1385%;"></col><col style="width: 27.2727%;"></col><col style="width: 18.236%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td class="align-center" style="height: 29.7969px;">**Test Type**</td><td class="align-center" style="height: 29.7969px;">**Input Tokens**</td><td class="align-center" style="height: 29.7969px;">**Output/Completion Tokens**</td><td class="align-center" style="height: 29.7969px;">**Price per test**</td></tr><tr style="height: 29.7969px;"><td class="align-center" style="height: 29.7969px;">Unit (per Java method) </td><td class="align-center" style="height: 29.7969px;">2500-10000</td><td class="align-center" style="height: 29.7969px;">5000-20000</td><td class="align-center" style="height: 29.7969px;">$0.08 - $0.33</td></tr><tr style="height: 29.7969px;"><td class="align-center" style="height: 29.7969px;">API Test (Swagger) - Rest Assured</td><td class="align-center" style="height: 29.7969px;">2000-5000</td><td class="align-center" style="height: 29.7969px;">5000-10000</td><td class="align-center" style="height: 29.7969px;">$0.081 - $0.165</td></tr><tr style="height: 29.7969px;"><td class="align-center" style="height: 29.7969px;">API Test (Swagger) - Postman</td><td class="align-center" style="height: 29.7969px;">2000-5000</td><td class="align-center" style="height: 29.7969px;">5000-10000</td><td class="align-center" style="height: 29.7969px;">$0.081 - $0.165</td></tr><tr style="height: 29.7969px;"><td class="align-center" style="height: 29.7969px;">Functional Test</td><td class="align-center" style="height: 29.7969px;">15000-50000</td><td class="align-center" style="height: 29.7969px;">10000-20000</td><td class="align-center" style="height: 29.7969px;">$0.195 - $0.45</td></tr></tbody></table>

Note:

- RoostGPT Hosted Stack (with DB) caches the AI response and avoids repeat calls to AI model, under identical circumstances
- RoostGPT CLI and VSCode Extension, however do not avail any cache benefit
- Usage of AWS Knowledge Base can incur additional costs

References:

- [https://aws.amazon.com/bedrock/pricing/](https://aws.amazon.com/bedrock/pricing/)