CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

Multiple-browser: foldername implementation issue

Open joelgrimberg opened this issue 9 years ago • 7 comments

At first I want to say what a great tool Codecept.JS is for me. Thanx a lot for that!

When I test the suite via multiple-browser option, I find 2 bugs, and have 1 feature request.

  • the first browser-resolution combination I configure will be used in all folder-names for that browser.
  • screenshots in these folders are the same size
  • every device/resolution combination in my config file (for example {browser: 'chrome', windowSize: '1220x1000'},) results in my mochawesome reporter into 1 report (so 10 browser/res combinations results in 10 tabs with 10 reports). would be cool if the multiple-browser option with mochawesome results in 1 report. somehow ;)

Foldername output when testing via multiplebrowser option:

drwxr-xr-x 7 joel staff 238B Apr 20 19:25 basic_browser_chrome_windowSize_1220x1000_1 drwxr-xr-x 7 joel staff 238B Apr 20 19:25 basic_browser_chrome_windowSize_1220x1000_2 drwxr-xr-x 7 joel staff 238B Apr 20 19:25 basic_browser_chrome_windowSize_1220x1000_3 drwxr-xr-x 7 joel staff 238B Apr 20 19:25 basic_browser_chrome_windowSize_1220x1000_4 drwxr-xr-x 7 joel staff 238B Apr 20 19:25 basic_browser_firefox_windowSize_maximize_5 drwxr-xr-x 7 joel staff 238B Apr 20 19:24 basic_browser_firefox_windowSize_maximize_6 drwxr-xr-x 7 joel staff 238B Apr 20 19:24 basic_browser_firefox_windowSize_maximize_7 drwxr-xr-x 7 joel staff 238B Apr 20 19:24 basic_browser_firefox_windowSize_maximize_8 drwxr-xr-x 7 joel staff 238B Apr 20 19:25 basic_browser_firefox_windowSize_maximize_9 drwxr-xr-x 3 joel staff 102B Apr 20 19:24 basic_browser_safari_windowSize_maximize_10 drwxr-xr-x 3 joel staff 102B Apr 20 19:24 basic_browser_safari_windowSize_maximize_11 drwxr-xr-x 2 joel staff 68B Apr 20 19:24 basic_browser_safari_windowSize_maximize_12 drwxr-xr-x 2 joel staff 68B Apr 20 19:24 basic_browser_safari_windowSize_maximize_13 drwxr-xr-x 3 joel staff 102B Apr 20 19:24 basic_browser_safari_windowSize_maximize_14

multi-browser configuration:

      "browsers" :
      [
        {browser: 'chrome', windowSize: '1220x1000'},
        {browser: 'chrome', windowSize: '1024x1000'},
        {browser: 'chrome', windowSize: '768x1000'},
        {browser: 'chrome', windowSize: '320x1000'},

        {browser: 'firefox', windowSize: 'maximize'},
        {browser: 'firefox', windowSize: '1220x1000'},
        {browser: 'firefox', windowSize: '1024x1000'},
        {browser: 'firefox', windowSize: '768x1000'},
        {browser: 'firefox', windowSize: '320x1000'},

        {browser: 'safari', windowSize: 'maximize'},
        {browser: 'safari', windowSize: '1220x1000'},
        {browser: 'safari', windowSize: '1024x1000'},
        {browser: 'safari', windowSize: '768x1000'},
        {browser: 'safari', windowSize: '320x1000'}
    ]

joelgrimberg avatar Apr 20 '17 18:04 joelgrimberg

Can someone please provide a working example for this multiple browser implementation? I tried but its not working properly. Some simple example with config pls.

shrikanthkm07 avatar Apr 21 '17 09:04 shrikanthkm07

https://github.com/joelgrimberg/demo

joelgrimberg avatar Apr 21 '17 18:04 joelgrimberg

Thanks @joelgrimberg !!!

shrikanthkm07 avatar Apr 24 '17 11:04 shrikanthkm07

@shrikanthkm07 you're welcome. Just let me know if you have questions.

joelgrimberg avatar Apr 24 '17 11:04 joelgrimberg

@joelgrimberg Looks like first two issues is the same (multiple option just starts 5 instances with the same resolution). I'll check it.

About aggregation report feature - Every suite is running in separate child process and it would be hard to mix all reports in one. I think that we can do some aggregator for reports that will generate one more page, that will contains list of links to reports. Will investigate this

APshenkin avatar Jun 01 '17 08:06 APshenkin

Fix is ready to merge to master.

About reports dashboard: will monitor this issue in mochawesome https://github.com/adamgruber/mochawesome/issues/90. When it will be ready we will use it to automatically generate dashboard

APshenkin avatar Aug 24 '17 11:08 APshenkin

@joelgrimberg How do I configure multiple suites to run on different Chrome browsers?I don't know how to config it.Please help to me,thanks "multiple": { "suiteName": "", "suiteConf": "", "browser": [ "chrome" ] },

lsq4590578 avatar Nov 30 '17 09:11 lsq4590578