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

fix: AttemptResult object #26569

Merged
merged 13 commits into from
Jun 30, 2023
Merged

Conversation

Ioanna2001
Copy link
Contributor

Additional details

  • Fields are added to AttempResult object
  • This change is necessary in order to correspond to the current TestResult properties

Steps to test

  • Create a test with retries
  • Log the currentTestResult
  • Check the object's properties

PR tasks

  • Changed duartion to wallClockDuration
  • Changed startedAt to wallClockStartedAt
  • Added failedFromHookId
  • Added timings
  • TODO: Should Timings object be created?
  • TODO: Should documentation be updated?

Questions for reviewers

  • Should a Timings object be created?
  • Should additional properties be added to AttemptResult object other than those specified in the issue?

image

* Changed duartion to wallClockDuration

* Changed startedAt to wallClockStartedAt

* Added failedFromHookId

* Added timings

* TODO: Should Timings object be created?

* TODO: Should documentation be updated?
@CLAassistant
Copy link

CLAassistant commented Apr 23, 2023

CLA assistant check
All committers have signed the CLA.

@Ioanna2001 Ioanna2001 changed the title Fix AttemptResult object fix: AttemptResult object Apr 23, 2023
@Ioanna2001 Ioanna2001 marked this pull request as ready for review April 23, 2023 21:37
@Ioanna2001 Ioanna2001 marked this pull request as draft April 23, 2023 21:38
@nagash77
Copy link
Contributor

nagash77 commented Jun 7, 2023

Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen.

@nagash77 nagash77 closed this Jun 7, 2023
@nagash77 nagash77 reopened this Jun 7, 2023
@nagash77 nagash77 closed this Jun 7, 2023
@Ioanna2001
Copy link
Contributor Author

Hello, I will keep on working on this issue I have just been busy with work and school. I am picking it up again soon.

@nagash77 nagash77 reopened this Jun 8, 2023
@jnovoadeuna
Copy link

@Ioanna2001 Thank you very much for your interest in solving this problem. I'm currently having the same problem that you solve with this PR, I'm looking forward to it being merged. Thanks again for your contribution.

Ioanna2001 and others added 3 commits June 24, 2023 20:41
@Ioanna2001 Ioanna2001 marked this pull request as ready for review June 25, 2023 15:55
@Ioanna2001 Ioanna2001 marked this pull request as draft June 25, 2023 15:58
@cypress
Copy link

cypress bot commented Jun 25, 2023

32 flaky tests on run #48201 ↗︎

0 27897 1348 0 Flakiness 32

Details:

Remove mixed up folder
Project: cypress Commit: ee2898a60a
Status: Passed Duration: 20:23 💡
Started: Jun 25, 2023 7:39 PM Ended: Jun 25, 2023 8:00 PM
Flakiness  create-from-component.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
... > runs generated spec Output Screenshots Video
Flakiness  specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs Output Screenshots Video
Flakiness  cypress-in-cypress-component.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
Cypress In Cypress CT > default config > redirects to the specs list with error if a spec is not found Output Screenshots Video
Flakiness  cypress-origin-communicator.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
Cypress In Cypress Origin Communicator > cy.origin passivity with app interactions > passes upon test reload mid test execution Output Screenshots Video
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
network stubbing > intercepting request > can delay and throttle a StaticResponse Output Video

The first 5 flaky specs are shown, see all 21 specs in Cypress Cloud.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@Ioanna2001 Ioanna2001 marked this pull request as ready for review June 25, 2023 17:06
@Ioanna2001 Ioanna2001 marked this pull request as draft June 25, 2023 19:19
@Ioanna2001 Ioanna2001 marked this pull request as ready for review June 25, 2023 19:29
@mike-plummer mike-plummer self-assigned this Jun 28, 2023
@mike-plummer
Copy link
Contributor

@Ioanna2001 I made a few updates based on a quick look at the code; seems like the timings and hookInformation fields can potentially be null, and there's sometimes a hookId field supplied to a Timing based on how it's triggered. Also made a tweak to the changelog entry. LMK if you disagree with any of it.

I'll track down another approver and get this merged assuming everything on CI comes back green

cli/types/cypress-npm-api.d.ts Outdated Show resolved Hide resolved
interface AttemptResult {
state: string
error: TestError | null
startedAt: dateTimeISO
duration: ms
wallClockStartedAt: dateTimeISO
Copy link
Contributor

Choose a reason for hiding this comment

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

These seem correct.

@mike-plummer mike-plummer merged commit df437cd into cypress-io:develop Jun 30, 2023
@mike-plummer
Copy link
Contributor

@Ioanna2001 Thanks for the contribution, sorry it took us a while to get it merged in. This will be included in our next release

@Ioanna2001
Copy link
Contributor Author

@mike-plummer Thank you for the help and the update, I'm really glad I was able to help. Looking forward for the release!

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 6, 2023

Released in 12.17.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.17.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jul 6, 2023
@Ioanna2001 Ioanna2001 deleted the issue-24110 branch September 11, 2023 14:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong 'AttemptResult' TS type
6 participants