Как сообщать о всех возможностях с помощью Jasmine транспортир - PullRequest
0 голосов
/ 30 марта 2020

Поэтому у меня возникают проблемы с использованием отчета о тестовом случае для каждой версии ОС с использованием browserstack:

//let SpecReporter = require('mochawesome').SpecReporter;
let SpecReporter = require('jasmine-spec-reporter').SpecReporter;

exports.config = {

    "browserstackUser": "helloworld",
    "browserstackKey": "123456789",

    multiCapabilities: [
        //Apple

        // Safari
        {
            browserName: 'Safari',
            browser_version: '13.0',
            os: 'OS X',
            resolution: "1920x1080",
            os_version: 'Catalina',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Safari 13 - Happy Flow"
        },
        {
            browserName: 'Safari',
            browser_version: '12.0',
            os: 'OS X',
            resolution: "1920x1080",
            os_version: 'Mojave',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Safari 12 - Happy Flow"
        },

        //Firefox

        {
            browserName: 'Firefox',
            browser_version: '73.0 beta',
            os: 'OS X',
            resolution: "1920x1080",
            os_version: 'Catalina',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Firefox 73.0 Beta - Happy Flow"
        },
        {
            browserName: 'Firefox',
            browser_version: '72.0',
            os: 'OS X',
            resolution: "1920x1080",
            os_version: 'Catalina',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Firefox 72.0 - Happy Flow"
        },

        //Chrome

        {
            browserName: 'Chrome',
            browser_version: '80.0',
            os: 'OS X',
            resolution: "1920x1080",
            os_version: 'Catalina',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Chrome 80.0 - Happy Flow"
        },
        {
            browserName: 'Chrome',
            browser_version: '79.0',
            os: 'OS X',
            resolution: "1920x1080",
            os_version: 'Catalina',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Chrome 79.0 - Happy Flow"
        },

        //Edge

        {
            browserName: 'Edge',
            browser_version: '79.0 beta',
            os: 'OS X',
            resolution: "1920x1080",
            os_version: 'Catalina',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Edge 79.0 Beta - Happy Flow"
        },


        //Windows 10

        //Chrome

        {
            browserName: 'Chrome',
            browser_version: '80.0',
            os: 'Windows',
            resolution: "1920x1080",
            os_version: '10',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Chrome 80.0 - Happy Flow"
        },
        {
            browserName: 'Chrome',
            browser_version: '79.0',
            os: 'Windows',
            resolution: "1920x1080",
            os_version: '10',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Chrome 79.0 - Happy Flow"
        },

        //Firefox

        {
            browserName: 'Firefox',
            browser_version: '73.0 beta',
            os: 'Windows',
            resolution: "1920x1080",
            os_version: '10',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Firefox 73.0 Beta - Happy Flow"
        },
        {
            browserName: 'Firefox',
            browser_version: '72.0',
            os: 'Windows',
            resolution: "1920x1080",
            os_version: '10',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Firefox 72.0 - Happy Flow"
        },

        //Edge

        {
            browserName: 'Edge',
            browser_version: '79.0 beta',
            os: 'Windows',
            resolution: "1920x1080",
            os_version: '10',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Edge 79.0 Beta - Happy Flow"
        },
        {
            browserName: 'Edge',
            browser_version: '18.0',
            os: 'Windows',
            resolution: "1920x1080",
            os_version: '10',
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Edge 18.0 - Happy Flow"
        }


    ],

    maxSessions: 1,


    specs: [
        'pagesDesktop/ikeaPage.js',
        'pagesDesktop/detailsPage.js',
        'pagesDesktop/servicesPage.js',
        'pagesDesktop/paymentPage.js',
        'pagesDesktop/thankyouPage.js'
    ],

    jasmineNodeOpts: {
        showColors: true,
        defaultTimeoutInterval: 60000,
        isVerbose: true,
        realtimeFailure: true,
        includeStackTrace: true
    },

    SELENIUM_PROMISE_MANAGER: false,

    framework: 'jasmine',

    params: {
        cardType: {
        }
    },

    onPrepare: function () {
        jasmine.getEnv().addReporter(new SpecReporter({
            displayFailuresSummary: true,
            displayFailuredSpec: true,
            displaySuiteNumber: true,
            displaySpecDuration: true,
            jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter('outputdir/', true, true));
        }));
    }
};

Моя проблема сейчас заключается в том, что он сообщает только о первом browserName, которое является Safari, и пропускает остальные. Он полностью выполняет весь тест, но ничего не сообщает, кроме первого теста в браузерном стеке.

Как мне сообщить обо всех браузерах, которые тестируются?

...