Git Product home page Git Product logo

Comments (7)

Evilweed avatar Evilweed commented on June 20, 2024

@yakalinkin can You attach full protractor.conf.js and spec file that reproduces this issue?

from protractor-beautiful-reporter.

yakalinkin avatar yakalinkin commented on June 20, 2024
/* protractor.conf.ts */

import { Config } from 'protractor';

const JasmineConsoleReporter = require('jasmine-console-reporter');
const HtmlReporter = require('protractor-beautiful-reporter');

export let config: Config = {
  SELENIUM_PROMISE_MANAGER: false,

  framework: 'jasmine',

  jasmineNodeOpts: {
    showColors: true,
    includeStackTrace: true,
    defaultTimeoutInterval: 900000,
  },

  seleniumAddress: 'http://localhost:4444/wd/hub',

  specs: ['./googleExample.spec.js'],

  multiCapabilities: [
    {
      browserName: 'chrome',
      count: 5
    },
    {
      browserName: 'firefox',
      count: 5
    },
  ],

  getPageTimeout: 600000,
  allScriptsTimeout: 600000,

  onPrepare() {
    setupReporter();
  },
};

export function setupReporter() {
  jasmine.getEnv().clearReporters();

  jasmine.getEnv().addReporter(new JasmineConsoleReporter({
    colors: true,
    cleanStack: true,
    verbosity: true,
    listStyle: 'flat', // "flat"|"indent"
    activity: false,
  }));

  jasmine.getEnv().addReporter(new HtmlReporter({
    baseDirectory: 'dist/report',
    screenshotsSubfolder: 'images',
    jsonsSubfolder: 'jsons',
    gatherBrowserLogs: false,
    preserveDirectory: false,
  }).getJasmine2Reporter());
}
/* googleExample.spec.ts */

import { $, browser, protractor } from 'protractor';

browser.waitForAngularEnabled(false);

describe('Google', () => {
  beforeAll(async () => {
    await browser.get('http://google.com/');
  });

  it('should search by `protractor`', async () => {
    await $('.gsfi[name="q"]').sendKeys('protractor', protractor.Key.RETURN);

    const value = await $('.gsfi[name="q"]').getAttribute('value');
    expect(value).toEqual('protractor');
  });
});

Pass/Fail counts reported as 7 - should be 10

Errors

[firefox #61] I/runnerCli - EBUSY: resource busy or locked, rmdir 'C:\**\dist\report\images'
[firefox #61] E/launcher - Runner process exited unexpectedly with error code: 1
[firefox #71] I/runnerCli - ENOTEMPTY: directory not empty, rmdir 'C:\**\dist\report\jsons'
[firefox #71] E/launcher - Runner process exited unexpectedly with error code: 1
[firefox #51] ENOENT: no such file or directory, open 'C:\**\dist\report\assets\angular.min.js'
[firefox #51]     at Object.fs.openSync (fs.js:663:18)
[firefox #51]     at copyFileSync (C:\**\node_modules\protractor-beautiful-reporter\index.js:10731:18)
[firefox #51]     at copySync (C:\**\node_modules\protractor-beautiful-reporter\index.js:10799:5)
[firefox #51]     at contents.forEach.content (C:\**\node_modules\protractor-beautiful-reporter\index.js:10810:7)
[firefox #51]     at Array.forEach (<anonymous>)
[firefox #51]     at Object.copySync (C:\**\node_modules\protractor-beautiful-reporter\index.js:10807:14)
[firefox #51]     at addHTMLReport (C:\**\node_modules\protractor-beautiful-reporter\index.js:5119:17)
[firefox #51]     at Object.addMetaData (C:\**\node_modules\protractor-beautiful-reporter\index.js:5193:9)
[firefox #51]     at Jasmine2Reporter._callee8$ (C:\**\node_modules\protractor-beautiful-reporter\index.js:4962:38)
[firefox #51]     at tryCatch (C:\**\node_modules\protractor-beautiful-reporter\index.js:5377:40)

[firefox #51] ENOENT: no such file or directory, rmdir 'C:\**\dist\report\.lock'
[firefox #51]     at Object.fs.rmdirSync (fs.js:866:18)
[firefox #51]     at Object.addMetaData (C:\**\node_modules\protractor-beautiful-reporter\index.js:5195:12)
[firefox #51]     at Jasmine2Reporter._callee8$ (C:\**\node_modules\protractor-beautiful-reporter\index.js:4962:38)
[firefox #51]     at tryCatch (C:\**\node_modules\protractor-beautiful-reporter\index.js:5377:40)
[firefox #51]     at Generator.invoke [as _invoke] (C:\**\node_modules\protractor-beautiful-reporter\index.js:5651:22)
[firefox #51]     at Generator.prototype.(anonymous function) [as next] (C:\**\node_modules\protractor-beautiful-reporter\index.js:5410:21)
[firefox #51]     at step (C:\**\node_modules\protractor-beautiful-reporter\index.js:4481:191)
[firefox #51]     at C:\**\node_modules\protractor-beautiful-reporter\index.js:4481:361
[firefox #51]     at <anonymous>
[firefox #51]     at process._tickCallback (internal/process/next_tick.js:160:7)

from protractor-beautiful-reporter.

Evilweed avatar Evilweed commented on June 20, 2024

@yakalinkin I've tried to reproduce Your case on OSx - sadly it works properly. I don't have windows machine to test it on Windows system :(

Can You check if this issue occurs if You set preserveDirectory: true ?

from protractor-beautiful-reporter.

yakalinkin avatar yakalinkin commented on June 20, 2024

@Evilweed preserveDirectory: true doesn't work well always.
They lose results if WebDriverError: java.net.BindException: Address already in use: connect error.

The reporter also breaks down on the OS X.

from protractor-beautiful-reporter.

Evilweed avatar Evilweed commented on June 20, 2024

@yakalinkin I tried Your config and test case again on OSx (multiple times) and it keeps showing me proper 10/10 test cases reported. Does this issue occur constantly or just sometimes?

from protractor-beautiful-reporter.

yakalinkin avatar yakalinkin commented on June 20, 2024

@Evilweed Now, works fine. I don't know what's happened.

I think you can close this issue now :)

from protractor-beautiful-reporter.

Evilweed avatar Evilweed commented on June 20, 2024

@yakalinkin closing as per comment. Thanks :)

from protractor-beautiful-reporter.

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.