Commit b6bdee34 authored by Swathi Mashetty's avatar Swathi Mashetty

Initial commit

parent 27ffb30e
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="LLMRestAPI" />
</profile>
</annotationProcessing>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
[{"line":2,"elements":[{"start_timestamp":"2025-02-13T11:57:18.920Z","line":15,"name":"LLM validating a error from console","description":"","id":"api-testing-with-llm-model;llm-validating-a-error-from-console","after":[{"result":{"status":"passed"},"match":{"location":"StepDefinitions.ExceptionHandling.tearDown()"}}],"type":"scenario","keyword":"Scenario","steps":[{"result":{"duration":28556600,"status":"passed"},"line":16,"name":"LLM model body from a file","match":{"location":"StepDefinitions.PromptCall.llm_model_body_from_a_file()"},"keyword":"Given "},{"result":{"duration":26776869300,"status":"passed"},"line":17,"name":"user calls prompt API using POST method","match":{"location":"StepDefinitions.PromptCall.userCallsPromptAPIUsingPOSTMethod()"},"keyword":"When "},{"result":{"duration":12000100,"status":"passed"},"line":18,"name":"user verifies status code in response","match":{"location":"StepDefinitions.PromptCall.thenUserVerifiesStatusCode()"},"keyword":"Then "},{"result":{"duration":492660200,"status":"passed"},"line":19,"name":"print the LLM response attribute in a formatted way","match":{"location":"StepDefinitions.PromptCall.print_the_llm_response_attribute_in_a_formatted_way()"},"keyword":"And "}],"tags":[{"name":"@errorLLM"}]}],"name":"API testing with LLM model","description":"","id":"api-testing-with-llm-model","keyword":"Feature","uri":"file:src/test/resources/features/promptCall.feature","tags":[]}]
\ No newline at end of file
#Generated by Maven
#Thu Feb 13 16:38:04 IST 2025
groupId=org.example
artifactId=LLMRestAPI
version=1.0-SNAPSHOT
D:\LLM RestAPI\LLM RestAPI\src\main\java\POJO\PromptPOJO.java
D:\LLM RestAPI\LLM RestAPI\src\main\java\POJO\Main.java
Resources\TestData.class
StepDefinitions\ExceptionHandling.class
StepDefinitions\PromptCall.class
CucumberOptions\TestRunner.class
D:\LLM RestAPI\LLM RestAPI\src\test\java\StepDefinitions\PromptCall.java
D:\LLM RestAPI\LLM RestAPI\src\test\java\CucumberOptions\TestRunner.java
D:\LLM RestAPI\LLM RestAPI\src\test\java\Resources\TestData.java
D:\LLM RestAPI\LLM RestAPI\src\test\java\StepDefinitions\ExceptionHandling.java
Feature: Create an exception in the code
Scenario: Validate LLM handing the exception
Given the ecom website
When the homepage opens verify it
Then click on the course selenium
And verify navigated to course page
Feature: API testing with LLM model
Scenario Outline: Testing the LLM model API with different prompts
Given LLM model body with <prompt>
When user calls prompt API using POST method
Then user verifies status code in response
And user verifies response attribute from response
Examples:
| prompt |
| how to test a LLM model |
| Generate AI robot |
@errorLLM
Scenario: LLM validating a error from console
Given LLM model body from a file
When user calls prompt API using POST method
Then user verifies status code in response
And print the LLM response attribute in a formatted way
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment