devbratjha commited on
Commit
f2fcde4
·
verified ·
1 Parent(s): aa92e5d

Upload 12 files

Browse files
Sample_agent/test_case_generator_agent/.adk/session.db ADDED
Binary file (53.2 kB). View file
 
Sample_agent/test_case_generator_agent/.env ADDED
@@ -0,0 +1 @@
 
 
1
+ API_KEY=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
Sample_agent/test_case_generator_agent/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from . import agent
Sample_agent/test_case_generator_agent/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (202 Bytes). View file
 
Sample_agent/test_case_generator_agent/__pycache__/agent.cpython-312.pyc ADDED
Binary file (1.81 kB). View file
 
Sample_agent/test_case_generator_agent/agent.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from dotenv import load_dotenv
3
+ from google.adk.agents import Agent
4
+ from google.adk.models.lite_llm import LiteLlm
5
+
6
+ load_dotenv()
7
+
8
+ model = LiteLlm(
9
+ model="openai/gpt-4o-mini",
10
+ api_key=os.getenv("API_KEY"),
11
+ )
12
+
13
+ SYSTEM_PROMPT = """
14
+ You are an expert Senior Quality Assurance Engineer. Your goal is to help manual testers by automatically generating comprehensive, edge-case-heavy test suites from basic User Stories, Jira Tickets, or Acceptance Criteria.
15
+
16
+ When the user provides a requirement, you must generate a structured list of test cases divided into three categories:
17
+ 1. Positive Scenarios (Happy Path)
18
+ 2. Negative Scenarios (Error handling, invalid inputs)
19
+ 3. Edge Cases (Boundary conditions, unusual user behavior, tricky states)
20
+
21
+ Format your output as a professional, easy-to-read Markdown table with the following columns:
22
+ | Test ID | Category | Scenario Description | Pre-conditions | Steps to Reproduce | Expected Result |
23
+
24
+ Rules:
25
+ - Be highly specific in your steps and expected results.
26
+ - Do not use vague terms like "it should fail." Instead use "System displays error message to the user: 'Invalid credentials'."
27
+ - Always include at least 2 tricky Edge Cases that a junior tester might forget.
28
+ - Keep the tone professional, concise, and ready to be copy-pasted into a test management tool like Jira or Zephyr.
29
+ """
30
+
31
+ root_agent = Agent(
32
+ name="test_case_generator",
33
+ model=model,
34
+ description="Generates detailed test cases from user stories or acceptance criteria.",
35
+ instruction=SYSTEM_PROMPT,
36
+ )
Sample_agent/test_case_generator_agent/tmp/test_case_generator_agent/.adk/session.db ADDED
Binary file (53.2 kB). View file
 
Sample_agent/test_case_generator_agent/tmp/test_case_generator_agent/.env ADDED
@@ -0,0 +1 @@
 
 
1
+ API_KEY=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
Sample_agent/test_case_generator_agent/tmp/test_case_generator_agent/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from . import agent
Sample_agent/test_case_generator_agent/tmp/test_case_generator_agent/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (202 Bytes). View file
 
Sample_agent/test_case_generator_agent/tmp/test_case_generator_agent/__pycache__/agent.cpython-312.pyc ADDED
Binary file (1.81 kB). View file
 
Sample_agent/test_case_generator_agent/tmp/test_case_generator_agent/agent.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from dotenv import load_dotenv
3
+ from google.adk.agents import Agent
4
+ from google.adk.models.lite_llm import LiteLlm
5
+
6
+ load_dotenv()
7
+
8
+ model = LiteLlm(
9
+ model="openai/gpt-4o-mini",
10
+ api_key=os.getenv("API_KEY"),
11
+ )
12
+
13
+ SYSTEM_PROMPT = """
14
+ You are an expert Senior Quality Assurance Engineer. Your goal is to help manual testers by automatically generating comprehensive, edge-case-heavy test suites from basic User Stories, Jira Tickets, or Acceptance Criteria.
15
+
16
+ When the user provides a requirement, you must generate a structured list of test cases divided into three categories:
17
+ 1. Positive Scenarios (Happy Path)
18
+ 2. Negative Scenarios (Error handling, invalid inputs)
19
+ 3. Edge Cases (Boundary conditions, unusual user behavior, tricky states)
20
+
21
+ Format your output as a professional, easy-to-read Markdown table with the following columns:
22
+ | Test ID | Category | Scenario Description | Pre-conditions | Steps to Reproduce | Expected Result |
23
+
24
+ Rules:
25
+ - Be highly specific in your steps and expected results.
26
+ - Do not use vague terms like "it should fail." Instead use "System displays error message to the user: 'Invalid credentials'."
27
+ - Always include at least 2 tricky Edge Cases that a junior tester might forget.
28
+ - Keep the tone professional, concise, and ready to be copy-pasted into a test management tool like Jira or Zephyr.
29
+ """
30
+
31
+ root_agent = Agent(
32
+ name="test_case_generator",
33
+ model=model,
34
+ description="Generates detailed test cases from user stories or acceptance criteria.",
35
+ instruction=SYSTEM_PROMPT,
36
+ )