ERMA / test_manual.py
mfirat007's picture
Upload 27 files
5cf374f verified
import unittest
from unittest.mock import patch, MagicMock
import sys
import os
import json
# Add the src directory to the path
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'src'))
class TestChatbotManualTests(unittest.TestCase):
"""
This class contains test cases that should be run manually to verify the chatbot's functionality.
These tests are designed to be run with a human evaluator who can assess the quality of responses.
"""
def test_qualitative_research_query(self):
"""
Test query: "What is qualitative research?"
Expected response should:
1. Provide a clear definition of qualitative research
2. Include key characteristics
3. Provide APA7 citation
4. Be relevant to educational research context
Manual verification required.
"""
print("\nManual Test 1: What is qualitative research?")
print("Expected: Definition, characteristics, and APA7 citation")
print("Verify that the response is accurate and properly cited")
def test_method_selection_query(self):
"""
Test query: "I want to study the impact of technology on student learning outcomes.
Which research method would be most appropriate?"
Expected response should:
1. Recommend appropriate research method(s)
2. Provide rationale for the recommendation
3. Include APA7 citation
4. Consider both qualitative and quantitative aspects
Manual verification required.
"""
print("\nManual Test 2: I want to study the impact of technology on student learning outcomes. Which research method would be most appropriate?")
print("Expected: Method recommendation with rationale and APA7 citation")
print("Verify that the recommendation is appropriate and well-justified")
def test_mixed_methods_query(self):
"""
Test query: "What are the advantages and disadvantages of mixed methods research in education?"
Expected response should:
1. List advantages of mixed methods
2. List disadvantages or challenges
3. Provide context specific to educational research
4. Include APA7 citation
Manual verification required.
"""
print("\nManual Test 3: What are the advantages and disadvantages of mixed methods research in education?")
print("Expected: Pros and cons with educational context and APA7 citation")
print("Verify that the response is balanced and comprehensive")
def test_follow_up_query(self):
"""
Test sequence:
1. "What is a case study in educational research?"
2. "What are the limitations of this method?"
Expected response to follow-up should:
1. Understand "this method" refers to case studies
2. List specific limitations of case studies
3. Maintain context from previous question
4. Include APA7 citation
Manual verification required.
"""
print("\nManual Test 4: Two-part conversation")
print("First query: What is a case study in educational research?")
print("Follow-up: What are the limitations of this method?")
print("Expected: Response should understand the context and provide limitations with citation")
print("Verify that the chatbot maintains conversation context")
def test_complex_query(self):
"""
Test query: "I'm conducting research on teacher professional development.
I want to measure both the effectiveness of the program and understand
teachers' experiences. What research design would you recommend?"
Expected response should:
1. Recognize the need for both quantitative and qualitative approaches
2. Recommend a specific mixed methods design
3. Explain how to implement the design
4. Include APA7 citation
Manual verification required.
"""
print("\nManual Test 5: I'm conducting research on teacher professional development. I want to measure both the effectiveness of the program and understand teachers' experiences. What research design would you recommend?")
print("Expected: Detailed mixed methods recommendation with implementation guidance and citation")
print("Verify that the response addresses both quantitative and qualitative aspects")
if __name__ == '__main__':
unittest.main()