Repository: confident-ai/deepeval
Issue: Ability to tie TestResults with TestCases for batch runs
Root cause: Unimplemented Feature Gap

**❗BEFORE YOU BEGIN❗**
Are you on discord? 🤗 We'd love to have you asking questions on discord instead: https://discord.com/invite/a3K9c8GRGt

**Is your feature request related to a problem? Please describe.**
When we run a list of test cases as a batch there is no reliable way tie the test results back to test cases. 

**Describe the solution you'd like**
It would be nice if TestCase's fields like name, comment and additional_metadata fields are passed along to TestResult. Ideally I would prefer to have a unique id for each test case that I can assign and that unique id should be passed to TestResult, however if that is a lot of change then just passing down the name, comment and additional_metadata fields to TestResult would be really helpful.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.


@debdayal-aws supported on confident ai https://docs.confident-ai.com/docs/evaluation-test-cases#labeling-test-cases-for-confident-ai

Thank you @penguine-ip I have seen that name field however - I am not using Confident AI cloud - running batch using EvaluationDataset from a JSON file and collecting list of TestResult after executing evaluation(). The [TestResult](https://github.com/confident-ai/deepeval/blob/main/deepeval/evaluate.py) does not have the name field from TestCase --- `@dataclass
class TestResult:
    """Returned from run_test"""

    success: bool
    metrics_data: Union[List[MetricData], None]
    conversational: bool
    multimodal: Optional[bool] = None
    input: Union[Optional[str], List[Union[str, MLLMImage]]] = None
    actual_output: Union[Optional[str], List[Union[str, MLLMImage]]] = None
    expected_output: Optional[str] = None
    context: Optional[List[str]] = None
    retrieval_context: Optional[List[str]] = None`

Hey please make a PR in that case, thanks!

On Sat, 21 Sep 2024 at 02:54, debdayal-aws ***@***.***> wrote:

> Thank you @penguine-ip <https://github.com/penguine-ip> I have seen that
> name field however - I am not using Confident AI cloud - running batch
> using EvaluationDataset from a JSON file and collecting list of TestResult
> after executing evaluation(). The TestResult
> <https://github.com/confident-ai/deepeval/blob/main/deepeval/evaluate.py>
> does not have the name field from TestCase --- ***@***.***
> class TestResult:
> """Returned from run_test"""
>
> success: bool
> metrics_data: Union[List[MetricData], None]
> conversational: bool
> multimodal: Optional[bool] = None
> input: Union[Optional[str], List[Union[str, MLLMImage]]] = None
> actual_output: Union[Optional[str], List[Union[str, MLLMImage]]] = None
> expected_output: Optional[str] = None
> context: Optional[List[str]] = None
> retrieval_context: Optional[List[str]] = None`
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/confident-ai/deepeval/issues/1019#issuecomment-2364340034>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BCFQK67QNP37KCEPETCEWQ3ZXRVOHAVCNFSM6AAAAABOSHO7MSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRUGM2DAMBTGQ>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>