Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API returns incorrect data for summary.lastRun #4058

Open
cb645j opened this issue Dec 2, 2024 · 0 comments
Open

API returns incorrect data for summary.lastRun #4058

cb645j opened this issue Dec 2, 2024 · 0 comments
Labels
bug Something isn't working triage requires triage user-request

Comments

@cb645j
Copy link

cb645j commented Dec 2, 2024

When querying the /api/testsuites/ttraceSmokeTestsSuite/version/${version} API, the results returns in the summary.lastRun block are not accurate. It seems to be returning the first run instead of the last run. If you look at my screenshots, you can see that the time, passes, etc. do not represent the last run. The summary.run field does seem to be correct, and all the fields within fullSteps seem to be accurate. There is just an issue with the lastRun json block.

To Reproduce
Steps to reproduce the behavior:

  1. create a test suite as such
type: TestSuite
spec:
  id: ttraceSmokeTestsSuite
  name: Smoke Tests Suite
  description: Runs all cricial test case
  steps:
  # - ../tests/sometest.yaml
  1. apply the testsuite via command line
    tracetest apply testsuite -f smokeTests.yaml

  2. execute the testsuite via command line
    tracetest run testsuite -f smokeTests.yaml

  3. make some changes to the test, add an assertation or failure so that result is different than before

  4. apply the testsuite again via command line
    tracetest apply testsuite -f smokeTests.yaml

  5. execute the testsuite again via command line
    tracetest run testsuite -f smokeTests.yaml

  6. Change the description of the testsuite (to force a version change)

  7. apply the testsuite again via command line
    tracetest apply testsuite -f smokeTests.yaml

  8. execute the testsuite again via command line
    tracetest run testsuite -f smokeTests.yaml

  9. query the following api
    /api/testsuites/ttraceSmokeTestsSuite/version/2

If you look at the lastRun block, it will not represent your last run

Expected behavior
The summary.lastRun should show the results of the last run

Screenshots
You can see from the UI, the last run was 12-2-24 and tests passed was 84, etc... However the API seems to be returning a 10-25-24 run as the lastRun despite there being more recent runs.

Postman API

UI screenshot

@cb645j cb645j added bug Something isn't working triage requires triage labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage requires triage user-request
Projects
None yet
Development

No branches or pull requests

1 participant