Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Trisha Chetani
    @trisha_1212_twitter
    i need a suggestion on how to implement
    have added this file named as flake

    const protractorFlake = require('protractor-flake');
    // skip first two passed args (node and self)
    let protractorArgs = process.argv.splice(2);

    protractorFlake({
    protractorPath: 'node_modules/.bin/protractor',
    maxAttempts: 2,
    parser: 'multi',
    nodeBin: 'node',
    protractorArgs: protractorArgs
    }, (status, output) => {
    process.exit(status);
    });

    but how does this file which read my config file , on success ful run it will know no need to re run the test
    and on failure it will re run the test
    any help
    Trisha Chetani
    @trisha_1212_twitter
    custom parser module : how do i configure to re run the failed test only
    not all specs if returned empty

    module default {
    name: 'rerun',
    parse (protractorTestOutput) {
    let failedSpecs = new Set()
    // ... analyze protractor test output
    // ... and add to specFiles
    failedSpecs.add('specfile')

        // specFiles to be re-run by protractor-flake
        // if an empty array is returned, all specs will be re-run
        return [...failedSpecs]
      }

    }

    Trisha Chetani
    @trisha_1212_twitter
    what the difference between standard parser and multi parser
    Trisha Chetani
    @trisha_1212_twitter
    how to stop running whole test and rerun only failed test
    lwouis
    @lwouis
    Hi guys! I'm looking to use protractor-flake but it seems the sharded mode is not supported for the moment. Anybody wrote a parser for that by any chance? :p
    lwouis
    @lwouis
    Oh I see there is the 'multi' parser now, great!
    I'll try it soon :)
    Ghost
    @ghost~5a226423d73408ce4f815588
    Yes
    Wim Selles
    @wswebcreation
    hi ;-)
    how are you tests configured?
    Ghost
    @ghost~5a226423d73408ce4f815588
    In the sense?
    Wim Selles
    @wswebcreation
    you have multiple e2e-files?
    Ghost
    @ghost~5a226423d73408ce4f815588
    Yes I've multiple e2e files
    I think @trisha_1212_twitter is facing same problem as mine
    Wim Selles
    @wswebcreation

    because what should happen is the following

    Your setup:

    • test-1.e2e.ts
    • test-2.e2e.ts
    • test-3.e2e.ts

    A test in file test-1.e2e.ts and test-2.e2e.ts fail. The generate a loggin which tells that the files failed
    Protractor-flake should read that logging and see that 2 files files, he should provide them again to protractor to do the rerun

    file test-3.e2e.ts should not be ran
    the standard parser should be sufficient
    Ghost
    @ghost~5a226423d73408ce4f815588
    But for example if there are 5 tests in one spec file and if 1 fails, would all 5 re-run
    ?
    I've not configured parser anywhere
    Is that required?
    Wim Selles
    @wswebcreation
    yes
    because you can't rerun 1 test, ir will rerun the complete file
    standard is the standard parser ;-)
    Ghost
    @ghost~5a226423d73408ce4f815588
    :D
    Okay then what I need to use to just re-run a single test
    Wim Selles
    @wswebcreation
    the reason why you can't rerun 1 test is that you can't run 1 test in jasmine from a spec file from the command line. Only if you do that manual with fit
    Ghost
    @ghost~5a226423d73408ce4f815588
    Hmmm I get that now
    Wim Selles
    @wswebcreation
    problem is also that you can't run 1 browser with one test / test-file from the command line based on a rerun with protractor-flake
    hope it helps giving you the correct insight in and protractor and protractor-flake
    Ghost
    @ghost~5a226423d73408ce4f815588
    Yeah it gives. and I've to be satisfied with what I've ;(
    @trisha_1212_twitter I think the above conversation can be helpful to you as well
    Wim Selles
    @wswebcreation
    :thumbsup:
    have a nice weekend, gonna do something with that weekend now ;-)
    Ghost
    @ghost~5a226423d73408ce4f815588
    You too, Thanks for all the help that you provided :)
    Wim Selles
    @wswebcreation
    you're welcome
    Yehuda Miller
    @pittgoose
    does anyone know if the number of the rerun attempt is available inside the tests?
    Like, I want to run something like this:
    if (rerunAttempt == 3){
        // do something here
    }
    Brine
    @qualityshepherd
    @pittgoose I don't believe it's available in say Jasmine
    aver0
    @aver0
    Hey Everyone, has anyone been successful in adding protractor-flake as a grunt task?
    I currently run my protractor tests via a grunt task but I can't figure out how to wrap that task in protractor-flake so enforce retries
    any hints would really help me out as I'm totally and utterly lost...
    Rahul
    @test-me123
    hi all