Coder Social home page Coder Social logo

gemini-testing / testplane Goto Github PK

View Code? Open in Web Editor NEW
679.0 16.0 62.0 11.05 MB

Testplane (ex-hermione) browser test runner based on mocha and wdio

Home Page: https://testplane.io

License: MIT License

JavaScript 73.91% TypeScript 26.09%
hermione testing-tools integration-testing e2e-testing testing testplane automation chrome chromium end-to-end-testing

testplane's Introduction

Testplane

Fast, scalable and robust testing solution for the ever-evolving web landscape.

Total Downloads Latest Release License Community Chat


Testplane (ex-Hermione) is a battle-hardened framework for testing web apps at any scale, any browser and any platform.

🧑‍💻 Developer Friendly: Enjoy a hassle-free start with our installation wizard, TypeScript support, instant feedback via live test editing, advanced HTML-reporter, and smart features like auto-wait and retries.

📸 Visual Testing Redefined: Capture anything from specific details to whole pages, manage diffs with a streamlined UI, explore a variety of diff modes and let Testplane tackle flakiness.

🌐 Test Across Environments: Forget being tied to a couple of latest Chrome builds. Testplane goes beyond that, offering testing on real devices and broad automation protocol support, mirroring your users' actual environments.

📈 Scale Effortlessly: Run thousands of tests on a remote browser grid or benefit from ultra-fast local execution. Testplane offers sharding, parallel test execution, and isolated browser contexts.

Infinite Extensibility: Testplane offers a versatile plugin system with dozens of open-source plugins on GitHub, along with custom reporters, commands, and execution logic.

📦 Various Test Environments: With Testplane you can run tests not only in Node.js environment but also in the browser. It means you can run e2e/integration tests in Node.js and component/unit tests in browser.

Getting started

Note: if you prefer manual installation, you can run npm i -D testplane. Check out the Docs for details.

  1. Use the CLI wizard to set up testplane and generate basic configuration:

    npm init testplane@latest new-testplane-project

    You may add -- --verbose argument to launch a tool in extra-questions mode, to pick custom package manager or install extra plugins.

  2. Open the newly generated file testplane-tests/example.testplane.ts. We’ll modify the test to ensure the description includes expected text:

    describe("test", () => {
        it("example", async ({browser}) => {
            await browser.url("https://example.com/");
    
            const description = await browser.$("p");
    
            await expect(description).toHaveTextContaining("for use in illustrative examples in documents");
        });
    });
  3. Launch GUI:

    npx testplane gui
  4. Try running the test and watch it pass. Now, let's replace description text check with a visual assertion. Use the assertView command to carry out visual checks:

    - await expect(description).toHaveTextContaining("for use in illustrative examples in documents");
    + await description.assertView("description"); // "description" is just a name of the assertion
  5. Run the test again. It will fail, because a reference image for the heading is missing. You can accept the diff and re-run the test, it will then pass.

Congratulations on writing your first Testplane test, which navigates to a page and executes a visual assertion. Dive into the Docs to discover more awesome features Testplane has to offer!

Docs

You can find the Docs on our website.

Feel free to visit these pages for a brief overview of some of Testplane features:

We post the most actual info, guides and changelogs on the website. You can improve it by sending pull requests to this repository.

Rename from "Hermione"

This project was formerly known as "Hermione", but eventually some copyright and trademark issues surfaced, leading to the decision to rebrand. After some discussion, we settled on "Testplane" as the official new title. Considering this change as merely a rebranding, we've proceeded with the existing version count instead of starting anew. Thus, Testplane v8.x is a drop-in replacement for Hermione v8.x.

Learn more about migration from Hermione to Testplane in the Docs.

Contributing

Our mission with this repository is to make the Testplane development process open, while continuing to improve upon its features, performance and ease of use. We hope other organizations find value in our project and benefit from our work.

We welcome and appreciate community contributions. To ensure our efforts are in sync, we recommend to raise an issue or leave a comment beforehand.

Visit our contributing guide to understand more about our development process and how to get involved.

License

Testplane is MIT licensed.

testplane's People

Contributors

andre487 avatar belyanskii avatar c1825846 avatar catwithapple avatar dmitriy-kiselyov avatar dudagod avatar egavr avatar epszaw avatar j0tunn avatar kabir-ivan avatar kolesnikovde avatar kuznetsovroman avatar kvmamich avatar leonsabr avatar levonet avatar mb1te avatar mcheshkov avatar miripiruni avatar nestrik avatar oldskytree avatar rostik404 avatar ruslanxdev avatar sbmaxx avatar shadowusr avatar sipayrt avatar swinx avatar tarmolov avatar tormozz48 avatar xrsd avatar y-infra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

testplane's Issues

Поддержка typescript

Сейчас у hermione нет тайпингов - использование с тайпскриптом немного затруднено.
Как w/a можно использовать тайпинги от webdriver.io, но это не очень удобно.
Хотелось бы чтобы тайпинги были из коробки.

Error on installing the package

>npm install -g hermione
npm ERR! code ENOPACKAGEJSON
npm ERR! package.json Non-registry package missing package.json: webdriverio@github:gemini-testing/webdriverio#master.
npm ERR! package.json npm can't find a package.json file in your current directory.
>node -v
v9.4.0
>npm -v
5.6.0

Windows 10 64bit
2018-01-30T12_49_51_333Z-debug.log

Skip doesn't work for before and after hooks

Hello,

hermione.skip feature doesn't work for Mocha's hooks.

I have a specific test suite, where I cook some preconditions, do tests, skip a step in a specific browser and want to skip postconditions for that specific browser:

describe('My test suite', function() {

    before(function () {
        return this.browser
            .foo_bar_preconditions;
    });

    after(function () {
        return this.browser
            .foo_bar_postconditions;
    });

    it('First test case', function() {
        return this.browser
            .foo_bar_1st_test_case;
    });

    hermione.skip.in('ie11', 'Because it is IE');
    it('Second test case', function() {
        return this.browser
            .foo_bar_2st_test_case;
    });

});

At the end of the test I want to skip after hook for IE, but if I put hermione.skip.in before after hook, skip.in feature will apply to the first it. It would be great if skipping could work for before and after hooks.

How to set up WebdriverIO config?

When I run test, I see a lot of warnings like:

(You can disable this warning by setting "deprecationWarnings": false in your WebdriverIO config)
WARNING: the "doDoubleClick" command will be deprecated soon. If you have further questions, reach out in the WebdriverIO Gitter support channel (https://gitter.im/webdriverio/webdriverio).
Note: This command is not part of the W3C WebDriver spec and won't be supported in future versions of the driver. It is recommended to just call the click command on the same element twice in the row.

I tried to create file wdio.conf.js with

module.exports = {
  deprecationWarnings: false
}

But is does not work.

hermione verion - 0.62.0

Scrollable div support

Добрый день!
Столкнулся со следующей проблемой. В верстке имеется div, с возможностью скроллить внутри него. Необходимо сделать скриншот всего дива, не открывая его в новой html. Скажите, можно ли как то переключить в него контекст? Попытка заскриншотить скриншотит только окно или что то внутри него.
Возможный workaround: изменить ограничение на body - height='100%` на height='auto'. Но если есть способ сделать это без изменения css, было бы замечательно, если бы Вы поделились. :)

Error: Cannot read property '0' of undefined — test-collection.js

If you give a non-existing browserId to sortTests it retrun error:

TypeError: Cannot read property '0' of undefined
    at TestCollection.getRootSuite (/Users/ruslankhh/work/web4-1/node_modules/hermione/lib/test-collection.js:19:52)
    at _.forEach (/Users/ruslankhh/work/web4-1/node_modules/hermione/lib/test-collection.js:25:31)
    at /Users/ruslankhh/work/web4-1/node_modules/lodash/lodash.js:4944:15
    at baseForOwn (/Users/ruslankhh/work/web4-1/node_modules/lodash/lodash.js:3001:24)
    at /Users/ruslankhh/work/web4-1/node_modules/lodash/lodash.js:4913:18
    at Function.forEach (/Users/ruslankhh/work/web4-1/node_modules/lodash/lodash.js:9359:14)
    at TestCollection.eachRootSuite (/Users/ruslankhh/work/web4-1/node_modules/hermione/lib/test-collection.js:24:11)
    at Hermione.hermione.on (/Users/ruslankhh/work/web4-1/node_modules/@yandex-int/templar-runner/hermione.js:84:24)
    at emitOne (events.js:121:20)
    at Hermione.emit (events.js:211:7)
    at Hermione.readTests (/Users/ruslankhh/work/web4-1/node_modules/hermione/lib/hermione.js:75:18)
    at <anonymous>

v.1 Breaking changes

  • Rename in cli conf option to config or configPath. It's more clear and obvious.
  • Add global browser variable instead of adding browser instance to the mocha context

Autosave screenshots when test fails

When tests are run in selenium grid and some of the tests fail, it won't be clear in some cases what's wrong with them. For example, chrome passes all tests but opera doesn't.

For debugging issues I usually run the specific browser locally. However, to run browsers like IE on my mac, I have to run VM. So I save screenshot for these browsers. It's working approach but saveScreenshot command should be inserted manually in the code and it's annoying.

It'd be great if hermione has an option to turn such behavior on.

`yarn audit` репортит множество уязвимостей после установки `hermione`

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ critical      │ Command Injection                                            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ growl                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=1.10.2                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ hermione                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ hermione > mocha > growl                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/146                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ Regular Expression Denial of Service                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ minimatch                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=3.0.2                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ hermione                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ hermione > mocha > glob > minimatch                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/118                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ hermione                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ hermione > q-promise-utils > lodash                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ low           │ Regular Expression Denial of Service                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ debug                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >= 2.6.9 < 3.0.0 || >= 3.1.0                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ hermione                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ hermione > mocha > debug                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/534                       │
└───────────────┴──────────────────────────────────────────────────────────────┘

Кажется, стоит мигрировать на более новую версию mocha (как минимум на 4.1.0)

Свойство конфига shouldRetry не работает

Свойство shouldRetry не работает.

При попытке указать его получаю ошибку парсинга конфига. Версия hermione - 0.65.2

Репозиторий с воспроизведением:
https://github.com/vrozaev/hermione-should-retry-error

Стектрейс:
UnknownKeysError: Unknown options: root.shouldRetry
at node_modules/gemini-configparser/lib/core.js:52:19
at node_modules/gemini-configparser/lib/core.js:95:9
at new Config (node_modules/hermione/lib/config/index.js:37:24)
at Function.create (node_modules/hermione/lib/config/index.js:12:16)
at new BaseHermione (node_modules/hermione/lib/base-hermione.js:22:31)
at new Hermione (node_modules/hermione/lib/hermione.js:17:9)
at Function.create (node_modules/hermione/lib/base-hermione.js:16:16)
at Object.exports.run (node_modules/hermione/lib/cli/index.js:25:31)
at Object. (node_modules/hermione/bin/hermione:4:33)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3

Random crush

Sometime random browser test is crushed:
✓ mocha no_failures [internet_explorer:c728732d-efd0-4c5a-ab36-5839c8fd0693] - 3618ms
✘ mocha no_failures [chrome:65481dee14146e30c9d85fc6fc94df0c] - 1870ms
✓ mocha no_failures [firefox:82fd7059-e951-4d99-a749-b9fd36809f80] - 5771ms

It may be ie/chrome/firefox, if i restart test it will work again

Hermione config is

module.exports = {
    sets: {
        desktop: {
            files: 'hermione_tests'
        }
    },

    browsers: {
        chrome: {
            desiredCapabilities: {
                browserName: 'chrome'
            }
        }
        ,
        firefox: {
            desiredCapabilities: {
                browserName: 'firefox'
            }
        }
        ,
        internet_explorer: {
            desiredCapabilities: {
                browserName: 'internet explorer'
            }
        }
    },
    gridUrl: "http://192.168.8.22:4444/wd/hub"
};

i have only one test - check mocha tests result on terminal

var assert = require('chai').assert;
describe('mocha', function() {
    it('no_failures', function() {
        return this.browser
            .url('http://192.168.8.21:5000/tests')
            .getText('.failures')
            .then(function(title) {
                assert.equal(title, 'failures: 0')
            });
    });
});

Вопрос про PAGE OBJECT и как получить данные из console в запущенном браузере

Вопросы:

  1. Я правильно понимаю: что PAGE OBJECT PATTERN также можно использовать и с hermione
    То есть как это описано у webdriverIO http://webdriver.io/guide/testrunner/pageobjects.html
    Так же создаю классы, расписываю методы и дальше использую их ?
  2. Я провожу тест где я сначала подписываюсь на события window.App.EventEmitter, далее заполняю поля формы и кликаю на кнопку для шага вперед. В console в запущенном браузере у меня эти данные попадают и я могу их просмотреть. Вы не подскажите как мне эти данные достать(пробросить в сам тест) и получить их уже в консоле моей IDE , либо лучше вариант сделать assert на них, ну то есть проверить что я получаю те данные что и указывал при заполнении. То есть, если они будут равны, то тест прошел, нет - то провал.
    Простите если неправильно подал информацию. Если нужно то могу прислать свой небольшой код теста, для понимания.
    Спасибо.

httpTimeout of undefined at [email protected]

$ node -v
v5.1.0
$ npm -v
3.3.12
$ npm ls -depth 0
[email protected] <CUT>
├── [email protected]
├── [email protected]
└── [email protected]
$ npm test

> [email protected] test <CUT>
> hermione

✘  "before all" hook [chrome] - 3ms
Total: 1 Passed: 0 Failed: 1 Pending: 0 Retries: 0

1)  "before all" hook
   in file undefined

   chrome
     ✘ TypeError: Cannot read property 'httpTimeout' of undefined
    at Browser._createSession (<CUT>/node_modules/hermione/lib/browser.js:68:58)
    at <CUT>/node_modules/hermione/lib/browser.js:28:45
    at Fulfilled_callInvoke [as callInvoke] (<CUT>/node_modules/q/q.js:1269:25)
    at Fulfilled_call [as call] (<CUT>/node_modules/q/q.js:1242:17)
    at Fulfilled_dispatch [as dispatch] (<CUT>/node_modules/q/q.js:1216:31)
    at Promise_dispatch_task (<CUT>/node_modules/q/q.js:978:28)
    at RawTask.call (<CUT>/node_modules/asap/asap.js:40:19)
    at flush (<CUT>/node_modules/asap/raw.js:50:29)
    at doNTCallback0 (node.js:430:9)
    at process._tickCallback (node.js:359:13)
npm ERR! Test failed.  See above for more details.

[email protected] - works correctly

страница отчета падает, если в meta в конфиге передать объект

hr
Ссылка в консоли:
https://reactjs.org/docs/error-decoder.html/?invariant=31&args[]=object%20with%20keys%20%7Blogin%2C%20password%7D&args[]=

В .hermione.conf.js:

meta: {
    user: {
        login: 'testLogin',
        password: 'testpassword'
    }
}

Если все тесты зелёные — страница отчёта формируется нормально. Если есть упавшие тесты — вместо страницы отчёта белый лист (с assertView точно воспроизводится).

На странице hermione gui также воспроизводится.

После того, как изменил конфиг, всё заработало нормально:

meta: {
    userLogin: 'testLogin',
    userPassword: 'testpassword'
}

Reports for Jenkins

Hello!

Want to run tests in the jenkins, but can't get report for Jenkins plugins for view results in build(use Xunit plugin).

Mocha has special reporter xunit
Add mochaOpts in config for Hermione like this

system: {
		mochaOpts: {
			reporter: 'xunit',
			timeout: 60000
		}
	}

It doesn't help, nothing change.

Full page screenshot с помощью Hermione

Добрый день!
Недавно начал начал интеграцию Hermione в рабочий проект и возник вопрос, на который в рамках ReadMe ответа не нашел:
Можно ли с помощью Hermione делать полностраничный скриншот в рамках прогона тестов? если да, то не могли бы Вы приложить пример того, как это можно было бы реализовать.
Спасибо

Missing steps in quickstart: where to put code example and Cannot find module 'chai'

I'ma trying to follow Quick Start (https://github.com/gemini-testing/hermione/blob/master/README.md#quick-start)

  1. staisfied prerequisites (installed selenium)
  2. installed hermione globally
  3. put .hermione.conf.js in the project root
  4. wrote first test: problem 1: not clear where to write that code example? Just guessed in 'tests/desktop', but better to put additional instructions about filename and place
  5. run hermione: problem 2: got an error Error: Cannot find module 'chai'

Неверные пути к скриншотам в html-отчете

Здравствуйте.
Поднимая Гермиону на windows столкнулся с проблемой. В отчете все слеши в путях заменяются на %5C.
https://yadi.sk/i/6m9dUtYbao7eGQ

Если вручную заменить их на / то картинки появляются
https://yadi.sk/i/Say1o9Uan0FFbQ

Заархивировал весь конфиг в архив:
https://yadi.sk/d/mMcBAGRb_8K77Q

Add parallelLimit option as it is done in Gemini.

It is required to have an ability to limix overall amount of simultaneous sessions for testing on Browserstack. Currently I got 30 browser x breakpoint combinations and getting errors from BS that my parallel limit reached.

How to debug integration tests?

When my test fails, I want to investigate what is wrong, opening a browser and checking a current state with devtools.

Webdriver.io has a debug method but the hermione doesn't. Could you suggest how to do a right debugging with hermione? It'd be great to have a documentation about it. It's a very important topic for the future clients.

hermione шарит обьект browser между несколькими сессиями

Если:
Запустить тесты в N сессиях в headless режиме
и сохранить в beforeEach this.browser в переменную browser
то hermione шарит переменную browser в первых N сессиях.

Воспроизведение: https://github.com/vrozaev/hermione-0.90.2-bug-reproduce

(возможно условие про headless режим лишнее, но с ним воспроизводится стабильно. Также стабильно должно воспроизводится с удаленным selenium grid)

Вопросы по поддержке hermione

Я не знаю куда вам можно еще написать чтобы быть услышанным, простите если это не то место. Скажите и я удалю этот запрос. К сожалению gitter я не нашел посвященный hermione, на youtube канале пока нет ответов.

  1. У вас есть в планах провести курс лекций(вводный курс или продвинутый) по hermione для новичков/опытных разработчиков?
  2. будет ли создан чат, может тот же gitter или slack(другие аналоги) использовать, где все смогут общаться и задавать вопросы и делится своими примерами кода.

Outdated version in central NPM repository

Hi, I noticed that the latest version which can be installed with npm i hermione is 0.20.0

Of course it is possible to use latest one just by fetching sources from github, but it's nice to sync releases with central NPM repository. At the moment if someone will follow quick start guide on github it wouldn't work because of difference between versions.

How to make conditional check based on visibility [docs]

How to add conditional action for example based on whether given element is visible or not?
Tried various ways with promises but getting reference error for browser

e.x.
return this.browser
.url('/')

         // How to check here if element X is visible then moveToObject('#x');
        //  If X not visible then  moveToObject('#Y');
         
        // test continues
        .click('#Something')

Нет функций 'beforeAll' и 'afterAll'

Добрый день! Столкнулся со следующей проблемой, требуется провести часть прекондишенов не перед каждым тестом, а один раз в начале в рамках одного describe. В ReadME на этот счет ничего не сказано, только beforeEach и afterEach представлены. Не могли бы Вы подсказать (с примером) как это обойти или как правильно написать плагин, в которой бы передавался инстанс вебдрайвера?

How i can switch between windows?

Can hermione switch between browser windows ?

I've code like this, but hermione doesn't know about switchWindow method...
webdriver API contains method: https://webdriver.io/docs/api/browser/switchWindow.html

describe('test_switch_window', function (browser) {

    it('test_switch_window', function () {

        return this.browser

            .url('https://my_intresting_site.com/')

            .$("button").click() // it opens new tab

            .switchWindow("new tab's title") // output .switchWindow is not a function ;(
    });

});

Не работает assertView

hermione 0.86.0, node v8.4.0, macos 10.13.6

//=== .hermione.conf.js ===
module.exports = {
    baseUrl: 'https://example.com',
    screenshotsDir: './_gemini-screens/',
    screenshotDelay: 3000,
    sets: {
        desktop: {
            files: 'test.js'
        }
    },
    browsers: {
        chrome: {
            desiredCapabilities: {
                browserName: 'chrome'
            }
        }
    }
};
//=== test.js ===
describe('the', function () {
    it('test', function () {
        this.browser
            .url('/')
            .assertView('plain', 'h1');
    });
});

hermione --update-refs не генерирует эталоны
hermione говорит, что тесты проходят, даже когда assertView натравлен на отсутствующий элемент.
screenshotDelay не выдерживается.

Не удается использовать метод assertView

Пытаюсь делать как в примере из Readme - выскакивает AssertViewError. Покопавшись в коде гермионы выяснил, что его вызывает NoRefImageError, который появляется из-за того что в дефолтной директории (/hermione/screens) нет нужных скринов:
can not find reference image at D:\ ... \hermione\screens\2de3131\chrome\body.png for "body" state

По Readme совершенно не понятно, откуда они должны браться. Сперва думал что как в gemini, при первом запуске собираются, а при повторном сравниваются - но видимо нет. В примере нет никакого намека на отдельное сохранение скриншотов.

Еще занимаясь дебагом этой проблемы заметил, что screenshotPath не подхватыватся из конфига методом, выводящим ошибку (пробовал и без этого параметра конфигурации, и с ним - путь к скринам в ошибке не меняется).

В общем был бы рад пояснениям, как этим методом пользоваться.

Missing 2.33-x64-chromedriver

I've installed hermione and selenium after start command test the error is appeared

Error: Missing C:\repository\html_qoob\node_modules\selenium-standalone\.selenium\chromedriver\2.33-x64-chromedriver
[1]     at C:\repository\html_qoob\node_modules\selenium-standalone\lib\check-paths-existence.js:15:20
[1]     at FSReqWrap.cb [as oncomplete] (fs.js:313:19)
[1] selenium-standalone start exited with code 1

Could somebody help me to resolve this issue?

My .hermione.config.js

module.exports = {
	gridUrl: 'http://localhost:4444/wd/hub',
    sets: {
        desktop: {
            files: 'tests/desktop'
        }
    },
    browsers: {
        chrome: {
            desiredCapabilities: {
                browserName: 'chrome',
            }
        }
    }
};

My packege.json

"scripts": {
        "test": "hermione",
        "start": "concurrently \"node server.js\" \"selenium-standalone start\""
},
 "devDependencies": {
        "chromedriver": "^2.33.2",
        "concurrently": "^3.5.0",
        "grunt": "^0.4.5",
        "grunt-cli": "^1.2.0",
        "grunt-contrib-clean": "^1.0.0",
        "grunt-contrib-compress": "^1.3.0",
        "hermione": "^0.50.3",
        "load-grunt-tasks": "^3.5.0",
        "selenium-standalone": "^6.11.0"
    }

Override hermione config with --conf

При попытке указать кастомный конфиг через --conf

hermione --conf hermione/.hermione.custom.conf.js

пытается искать дефолтный кофиг

Unable to read config from path .hermione.conf.js

Версия hermione - 0.65.2

Screenshot inside iframe

Добрый день!
Столкнулся со следующей проблемой: при переключении контекста вебдрайвера в iframe, попытка сделать assertView фотографирует левый верхний угол страницы, вне айфрейма.
можно ли как то переключить снятие скриншотов в контекст айфрейма?

it('SnapInsSupportFlowFirstPageReturn', function() { 
               return this.browser.element(iframelocator)
               .then(function (frame) {
                   return this.frame(frame.value)
               })
               .waitForVisible('#loading', 10000, true)
               .assertView('SnapInsSearchResultPageReturn', 'body');
}

Screenshooter

Hello, guys! Thanks for doing a great job with hermione.
We started using hermione for functional tests in our project and are curious if you have any plans to integrate a screen shooter into hermione?

Upd: by screen shooter I mean a tool for screen comparison if that make sense :)

Проблема с исполнением тестов в IE

Доброго времени суток. Недавно начал осваивать ваши инструменты для тестирования вёрстки gemini и hermione. В chrome, firefox всё отлично. Столкнулся с проблемой при прогоне тестов в IE 11 на windows. IE при запуске тестов открывается, но скриншоты не делаются, никакие команды не исполняются. Тесты падают по истечение таймаута. Пробовал использовать драйвер селениума 2.47 - не помогло. Подскажите, пожалуйста в чём может быть проблема? В конфигурационном файле IE указываю как
browsers: { ie: { compositeImage: true, desiredCapabilities: { browserName: 'internet explorer', } }
Так же буду очень признателен, если вы приведёте пример правильного указания устройств для тестирования и снятия скриншотов, iphone, ipad, например, в конфигурационном файле.

Устанавливаю hermione из npm и выходят ошибки

Если с ворнингами я еще смогу(Наверное) разобраться, то с ниже указными ошибками, что-то пока не получается.

npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

> [email protected] install D:\Dev\HermioneTest\node_modules\png-img
> node-gyp rebuild


D:\Dev\HermioneTest\node_modules\png-img>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Dev\HermioneTest\node_modules\png-img
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.```

this.test is 'undefined'

Hi guys!
After updating hermione (from v.0.56.2 to v.1.2.1)I faced the problem that this.test in my tests is undefined. this.currentTest in beforeEach hooks works fine.
So many of my tests broke.
Can you help, please?

Allow passing ` "deprecationWarnings": false ` option for WDIO.

I'm using the some deprecated mуthods of WDIO and a lot of warnings displayed in the console:

WARNING: the "moveTo" command will be deprecated soon. If you have further questions, reach out in the WebdriverIO Gitter support channel (https://gitter.im/webdriverio/webdriverio).
Note: This command is not part of the W3C WebDriver spec and won't be supported in future versions of the driver. It is recommended to use the actions command to emulate pointer events.

(You can disable this warning by setting `"deprecationWarnings": false` in your WebdriverIO config)

To disable them I need to pass the "deprecationWarnings": false config to WDIO.

Tests fail on firefox

Have strange, unstable error in tests

functionalTests git:(NSDAT-10398) ✗ hermione
http://localhost/portal/login.html
✘ Test location Test impossible to navigate to Portal employee with an empty location [firefox:3e8f1d38-2628-49f3-b13d-8a75544b6b79] - 7524ms
Total: 1 Passed: 0 Failed: 1 Skipped: 0 Retries: 0

  1. Test location Test impossible to navigate to Portal employee with an empty location
    in file EmployeeWithEmptyLocation.js

    firefox
    ✘ ClientBridgeError: Unable to inject gemini-core client script
    at execute("return typeof __geminiCore !== "undefined"? __geminiCore.resetZoom() : {error: "ERRNOFUNC"}") - existing-browser.js:144:30

TEST
it('Test impossible to navigate to Portal employee with an empty location', function () {
var browser = func.login(this.browser, consts.emptyLocation);
browser = func.assertUrl(browser, consts.loginUrl);
browser = func.goToUrl(browser, 'http://localhost/portal/serviceCalls.html?direction=all');
return func.assertUrl(browser, consts.loginUrl);
});

function login(browser, loginPassword) {
return browser
// .pause(1000)
.url(consts.baseUrl)
.waitForVisible(consts.xpathLoginInput, consts.waitDownload)
.setValue(consts.xpathLoginInput, loginPassword)
.setValue(consts.xpathPasswordInput, loginPassword)
.click(consts.xpathButtonSubmitLogin)
.pause(1000);
};

function assertUrl(browser, expectedUrl) {
return browser
.getUrl()
.then((url) => {
console.log(url);
assert.equal(url, expectedUrl);
});
};

function goToUrl(browser, url) {
return browser
.url(url)
.pause(2000);
};

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.