Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jan-Niklas W.
    @niklas-wortmann
    Hi everyone, is it possible to rerun protractor-flake just with failing tests due to timeouts? I think this would be a great possibility to improve the test quality.
    Luis Pablo
    @Pablodotnet
    Hello! :) Is somebody here?
    I have a little problem, I was using shardTestFiles: true in my protractor config because in one test I link an account with Facebook being on a dashboard interface, the next test unlinks account of facebook, and the next spec that is another file to test mobile interface I do this again, but if I'm not using shardTestFiles: true it obviously use the same browser so the process of linking a facebook account by second time is different and it doesn't display the log in pop up of facebook, that's why I was using shardTestsFiles, to avoid this issue and always pop up the facebook log in form, how can I solve my problem so I can use protractor-flake properly? Also, how I can make that it stops when the first failure happens and restart the test running?
    tomokat
    @tomokat
    Hi, has anyone try to use this seemingly awesome plugin with gulp? The project I work already uses gulp-protractor to run protractor tests and I can't see an easy path to integrate it so wondering if someone can share me some example gulp task that uses protractor-flake (if you use gulp-protractor, that would be bonus but that is probably too much to ask) - Thanks for your help in advance!
    Khaja Moinuddin Mohammed
    @moinuddin14
    Hello everyone. I was given protractor-flake a test but getting the following error.
    (function (exports, require, module, __filename, __dirname) { @IF EXIST "%~dp0\n
    ode.exe" (
                                                                  ^
    SyntaxError: Invalid or unexpected token
    I have tried various combinations of passing the protractor arguments but still facing the same issue
    node_modules\.bin\protractor-flake.cmd --protractor-path=node_modules\.bin\protractor.cmd --parser standard --node-bin node --max-attempts=3 --color=magenta -- suite=synthetic params.env syn_sat protractor.conf.js
    By the way the normal protractor tests run when i run from the command line as below
    node_modules\.bin\protractor.cmd protractor.conf.js --suite=synthetic --params.env syn_sat
    I have opened an issue against this here NickTomlin/protractor-flake#64
    Khaja Moinuddin Mohammed
    @moinuddin14
    Not sure if it helps, but am using ES5 and not ES6 or Typescript for my protractor js tests
    Bee
    @BelindaHarper
    Hello. Is it possible to use protractor-flake with Angular-CLI?
    Wilson Palkuri
    @wilsonpalkuri_twitter
    Hi @NickTomlin - I have same problem as @Martis89 and @amistry03. All my tests are being re run (both failed and passed). Where do you suggest to print test results ? i see that 'standard' parser is parsing the entire 'output'. Please advice or provide a written solution. Thanks.
    Wilson Palkuri
    @wilsonpalkuri_twitter
    @NickTomlin - Cn we use protractor-flake with --suite ? is there a fix for this yt ?
    Brine
    @qualityshepherd

    @NickTomlin I added a flakey test output file for jasmine-spec-reporter, and the following unit test:

        it('isolates individual failed specs from jasmine-spec-reporter output', () => {
          protractorFlake({maxAttempts: 3})
    
          spawnStub.dataCallback(failedJasmineSpecReporterTestOutput)
          spawnStub.endCallback(1)
    
          expect(spawnStub).to.have.been.calledWith('node', [pathToProtractor(), '--params.flake.retry', true, '--specs', '/tests/a-flakey.test.js'])
        })

    but it's failing with this error:

      1) Protractor Flake failed specs isolates individual failed specs from jasmine-spec-reporter output:
         AssertionError: expected stub to have been called with arguments node, ["/Users/brine/protractor-flake/node_modules/protractor/bin/protractor", "--params.flake.retry", true, "--specs", "/tests/a-flakey.test.js"]%D
          at Context.<anonymous> (test/unit/index.test.js:103:38)

    What am I doon wrong?

    Brine
    @qualityshepherd
    nvm :)
    faisalAvizia
    @faisalAvizia
    Anyone know if I can use protractor-flake if I am using mocha as my framewrk? @NickTomlin
    Wim Selles
    @wswebcreation

    Hi @faisalAvizia

    There is a PR for that one, see NickTomlin/protractor-flake#60. I asked @NickTomlin to merge it.

    So yep, there is a possibility, you just need to wait ;-)

    faisalAvizia
    @faisalAvizia
    Thanks @wswebcreation . Hopefully it'll get merged soon. I am starting a new project and would love to use this.
    Trisha Chetani
    @trisha_1212_twitter
    hi
    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