Skip to content

Instantly share code, notes, and snippets.

@treaz
treaz / SortTest.java
Last active Oct 24, 2019
JUnit5 Test of multiple implementations of sort via ParameterizedTest
View SortTest.java
package com.horiaconstantin.sorting.bycompare;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
class SortTest {
View Provider.java
package com.horiaconstantin;
import org.hibernate.boot.model.relational.Namespace;
import org.hibernate.boot.model.relational.Sequence;
import org.hibernate.mapping.Table;
import org.hibernate.tool.schema.spi.SchemaFilter;
import org.hibernate.tool.schema.spi.SchemaFilterProvider;
public class Provider implements SchemaFilterProvider {
View hibernate.properties
hibernate.hbm2ddl.schema_filter_provider=com.horiaconstantin.Provider
View wdio.conf.js
const config = require('config');
const includes = require('lodash.includes');
const chaiWebdriver = require('chai-webdriverio').default;
const chai = require('chai');
const VIEWPORT_SIZE = {
width: 1070,
height: 600,
};
const testsToRun = ['./test/selenium/*.js'];
View browserstack_passing.log
yarn selenium v0.24.5
$ rm -rf junit; rm -rf log/errorShots; NODE_ENV=unittest wdio test/wdio.remote.conf.js
[18:25:19]  COMMAND POST "/wd/hub/session"
[18:25:19]  COMMAND POST "/wd/hub/session"
[18:25:19]  DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"os":"OS X","os_version":"Yosemite","browserName":"Firefox","version":"47.0","project":"telegraaf2","browserstack.debug":true,"_":"4 more keys: [\"browserstack.networkLogs\",\"build\",\"loggingPrefs\",\"requestOrigins\"]"}}
[18:25:19]  DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"os":"OS X","os_version":"Yosemite","browserName":"Firefox","version":"47.0","project":"telegraaf2","browserstack.debug":true,"_":"4 more keys: [\"browserstack.networkLogs\",\"build\",\"loggingPrefs\",\"requestOrigins\"]"}}
[18:25:29]
View browserstack.log
yarn selenium v0.24.5
$ rm -rf junit; rm -rf log/errorShots; NODE_ENV=unittest wdio test/wdio.remote.conf.js
[18:17:17]  COMMAND POST "/wd/hub/session"
[18:17:17]  DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"os":"OS X","os_version":"Yosemite","browserName":"Firefox","version":"47.0","project":"telegraaf2","browserstack.debug":true,"_":"4 more keys: [\"browserstack.networkLogs\",\"build\",\"loggingPrefs\",\"requestOrigins\"]"}}
[18:17:17]  COMMAND POST "/wd/hub/session"
[18:17:17]  DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"os":"OS X","os_version":"Yosemite","browserName":"Firefox","version":"47.0","project":"telegraaf2","browserstack.debug":true,"_":"4 more keys: [\"browserstack.networkLogs\",\"build\",\"loggingPrefs\",\"requestOrigins\"]"}}
[18:17:26]
View MenuMoreLinks.js
View MenuMainLinks.js
View BrandMenu.js
import config from 'config';
import {user, login} from '../../utils/loginUtil';
import {acceptedCookies} from '../../utils/cookieWallUtil';
const {retryFailedTests} = config.selenium;
const {
SectionHeaderDesktop,
Popup,
} = selectors.selectors;
View wdio.conf.js
exports.config = {
//
// ==================
// Specify Test Files
// ==================
// Define which test specs should run. The pattern is relative to the directory
// from which `wdio` was called. Notice that, if you are calling `wdio` from an
// NPM script (see https://docs.npmjs.com/cli/run-script) then the current working
// directory is where your package.json resides, so `wdio` will be called from there.