Skip to content

✨ Label tests with unique IDs and propagate testuid#175

Merged
bzorn merged 5 commits intodevfrom
add-test-id
Jun 20, 2025
Merged

✨ Label tests with unique IDs and propagate testuid#175
bzorn merged 5 commits intodevfrom
add-test-id

Conversation

@bzorn
Copy link
Copy Markdown
Contributor

@bzorn bzorn commented Jun 20, 2025

Added unique testuid to each test and test result; updated logic to use it.

Added unique testuid to each test and test result; updated logic to use it.
@bzorn bzorn requested a review from pelikhan June 20, 2025 20:07
Test run data now includes testuid; testuid index starts from 0.
@pelikhan pelikhan requested a review from Copilot June 20, 2025 20:23
@pelikhan
Copy link
Copy Markdown
Member

@copilot use nanoid package for test generation

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new testuid field to tests and results, propagates it through test execution and evaluation, and updates related scripts and environment configuration.

  • Introduce testuid property in type definitions and propagate through runTest and evaluation logic
  • Assign unique IDs to tests in promptpexGenerate
  • Update package.json scripts and add .env.ollama for environment settings

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/genaisrc/src/types.mts Added optional testuid field to PromptPexTest and PromptPexTestResult
src/genaisrc/src/testrun.mts Passed testuid into the payload for runTest
src/genaisrc/src/testevalmetric.mts Lookup tests by testuid and error if not found
src/genaisrc/src/promptpex.mts Loop to assign testuid labels when missing
package.json Added new script variants with --env .env.ollama
.env.ollama New environment file for Ollama model credentials
Comments suppressed due to low confidence (2)

src/genaisrc/src/types.mts:352

  • [nitpick] Consider renaming testuid to testUid (or testID) to follow camelCase conventions for improved readability.
    testuid?: string

src/genaisrc/src/promptpex.mts:193

  • There are no unit tests verifying that testuid is assigned and propagated correctly. Add tests around promptpexGenerate to cover this new logic.
            if (!test.testuid) {

bzorn and others added 3 commits June 20, 2025 20:28
Integrated nanoid for generating unique, consistent test UIDs.
Corrected testuid generation format and used strict equality for lookup.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@bzorn bzorn merged commit 9ab58a2 into dev Jun 20, 2025
1 check passed
@bzorn bzorn deleted the add-test-id branch June 20, 2025 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants