Coder Social home page Coder Social logo

Comments (6)

rasjani avatar rasjani commented on June 24, 2024 2

I guess my pr will address this as it will call protractor with --params.flake.iteration which then can be used in via browser.params.flake.iteration.

from protractor-flake.

NickTomlin avatar NickTomlin commented on June 24, 2024

I think this makes a lot of sense, could you give me some pseudocode for how you'd use this? This could potentially be a param that we pass to protractor or an env variable that we set. I'd want to make sure we can do it in a way that wouldn't clash with protractor config.

from protractor-flake.

Tom-Hudson avatar Tom-Hudson commented on June 24, 2024

Glad you agree! To be honest I get a little twitchy with the thought of the attempt count being a Node environment variable as this value would persist if flake got stopped etc. It would also cause problems for shared CI/build servers with multiple builds unless you make the environment variable unique to the instance of flake running (not sure that's a good idea either)? In my opinion, it would be better as a param or just accessible from a flake instance:

onPrepare: () => { 
    if(flake.attemptNo == 1) {
        // Do cleanup
    }
}

But as I mentioned before, I would also be happy to put my code in functions passed to the protractor-flake config like so:

protractorFlake({
    parser: 'standard'
}, function(status, output) {
    process.exit(status);
}, function() {
    //beforeAttempts
}, function() {
    //afterAttempts
})

But the obvious drawback with the latter is that no 'protractor or jasmine stuff' will be available for use in either function. Also, if you go with this option, it would be nice if the functions could be callback managed (or accept a promised function) so time consuming operations can be performed synchronously (sorry for adding complexity).

Thanks!

from protractor-flake.

Tom-Hudson avatar Tom-Hudson commented on June 24, 2024

@rasjani - yes it would! If @NickTomlin is happy then I would link the PR so this issue can be closed.

from protractor-flake.

rasjani avatar rasjani commented on June 24, 2024

#88

And its also already released.

from protractor-flake.

NickTomlin avatar NickTomlin commented on June 24, 2024

@rasjani thanks for reporting back here and for your PR! I'm going to go ahead and close this issue 😄

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.