Giter VIP home page Giter VIP logo

Comments (6)

NickTomlin avatar NickTomlin commented on May 28, 2024

This is because the stack trace for exceptions thrown in webdriver promises does not include the line of the file. Protractor flake takes a very simple approach to scrapping through the stacktraces and if this information isn't found it treats it as a re-run.

There isn't a great solve for this at the moment; I'd more than welcome a PR to make this better.

Two questions

  • Can you share the output of the exception without using protractor flake?
  • Can you share the options you are passing to protractor-flake?

from protractor-flake.

Klaas-Jan avatar Klaas-Jan commented on May 28, 2024

Output:

   The Management Basic Onboarding should
     ✓ start an onboarding tour
 .    ✓ continue the onboarding process on product page
 F    ✗ should move to the next step when navigating between pages
       - Expected 'basicManagementTour:2:0' to be 'basicManagementTour:1'.
           at /home/jenkins/workspace/TA-3-test-chrome/viewtest/tests/onboarding/ManagementBasicOnboardingSpec.js:37:31
           at ManagedPromise.invokeCallback_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1379:14)
           at TaskQueue.execute_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2913:14)
           at TaskQueue.executeNext_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2896:21)
           at asyncRun (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2775:27)
           at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7
           at process._tickCallback (internal/process/next_tick.js:103:7)

Strange thing is ... I do see a filename to parse here.

Command line options:
protractor-flake --max-attempts=3 -- protractor.conf.js

This is because the stack trace for exceptions thrown in webdriver promises does not include the > line of the file. Protractor flake takes a very simple approach to scrapping through the
stacktraces and if this information isn't found it treats it as a re-run.

Maybe a quick fix would be that all the tests are being retried when the number of tests to retry don't match with the number of failed tests. I don't care if the tests have to take a while because they are all being retried, but failed tests not being retried while in the end the entire test suite is seen as 'green' is a bit dangerous ...

from protractor-flake.

NickTomlin avatar NickTomlin commented on May 28, 2024

Ah interesting; this output is from a different reporter than I am used to; unfortunately it still doesn't pass the criteria that the standard parser looks for.

Looking for passed files would be great but I don't know of a generic way to get which files passed and which did not (protractor doesn't provide this as far as I know). A custom reporter might solve this. Again, would love any ideas or a PR here.

I am going to work on writing the ability to make custom parsers for cases like this (since it seems like the spec file should always be the 1st at /stacktrace/path in your case. That way you can tailor it to your output and (hopefully) get the desired result. Does that sound acceptable?

from protractor-flake.

Klaas-Jan avatar Klaas-Jan commented on May 28, 2024

Sounds like a good idea.

from protractor-flake.

NickTomlin avatar NickTomlin commented on May 28, 2024

I have a pull request for custom parsers #45; I'd appreciate it if you'd take a look!

from protractor-flake.

NickTomlin avatar NickTomlin commented on May 28, 2024

Custom parsers have been released 9791183. I'm going to go ahead and close this for now. Feel free to reopen another issue if there is still a problem.

from protractor-flake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.