Skip to content

Instantly share code, notes, and snippets.

View benzaremean's full-sized avatar

Ben Ifie benzaremean

View GitHub Profile
Feature: Addresses
Scenario: Get request to address endpoint
Given I make a get request to '/dwp/residency/api/address'
Then the status code is 200
And response body should match 'address.json' JSON schema
And response body should return 5 items
And response body includes the following in any order:
| [0].guid | 10001 |
| [0].city | London |
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
const { spawnSync } = require('child_process');
const os = require('os');
const selenium = require('selenium-standalone');
const chalk = require('chalk');
const chromeVersionAndDriverMapping = {
'69': '2.41',
'68': '2.41',
'67': '2.41',
@benzaremean
benzaremean / networkSnooper.js
Created October 3, 2018 13:39
make client global
const path = require('path');
const CDP = require('chrome-remote-interface');
class EavesDropService {
constructor() {
this.seleniumHost = undefined;
}
shouldAttemptRemoteDebugConnection() {
return browser.desiredCapabilities.browserName === 'chrome';
@benzaremean
benzaremean / gist:cc57a7690e928f0c2676fc0b146a5230
Created October 3, 2018 11:48
service to intercept chrome
const path = require('path');
const CDP = require('chrome-remote-interface');
class EavesDropService {
constructor() {
this.seleniumHost = undefined;
this.urlsRegexToTrack = /search|reserve|initial|baskets|create_payment_resource|paypal|orderhistory/;
this.urlsRegexToIgnore = /analytics|facebook|smetrics/;
}