Skip to content

Instantly share code, notes, and snippets.

View vikramvi's full-sized avatar
🚀
React.js, React Native Developer + 4 startup experiences

Vikram Ingleshwar vikramvi

🚀
React.js, React Native Developer + 4 startup experiences
View GitHub Profile
PERF_API_URL: "http://localhost/v2/api/cicd/"
api_params:
sla:
pageLoadTime: 2000
baseline:
days: 7
perc: 75
padding: 1.2
flags:
assertBaseline: true
import os
import platform
from selenium import webdriver
from timingsclient import Perf
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver import ChromeOptions
#Jenkins Chrome Browser Fix
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.smava</groupId>
<artifactId>WebAnalytics_Automation_RegressionTesting</artifactId>
<version>1.0-SNAPSHOT</version>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.smava</groupId>
<artifactId>WebAnalytics_Automation_RegressionTesting</artifactId>
<version>1.0-SNAPSHOT</version>
@vikramvi
vikramvi / gist:fe020b1ef0f6b36ab4afe08dfcd965e3
Created January 19, 2018 09:40
config_geldHomePage.yaml
PERF_API_URL: "http://localhost/v2/api/cicd/"
api_params:
sla:
visualCompleteTime: 2000
baseline:
days: 7
perc: 75
padding: 1.2
flags:
assertBaseline: true
@vikramvi
vikramvi / gist:e3b57e3b70c9fa274441983676054c53
Created January 19, 2018 09:41
chrome_perf_geldHomePage.py
import os
import platform
from selenium import webdriver
from timingsclient import Perf
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver import ChromeOptions
#Jenkins Chrome Browser Fix
@vikramvi
vikramvi / gist:1a65486153cf7a62d6bf6a000de799c0
Last active March 14, 2018 16:47
lh.js ( working script - running command line using node-cmd package )
const lighthouse = require('lighthouse');
const nodeCmd = require('node-cmd');
const opts = {
disableDeviceEmulation: true,
disableCpuThrottling: true,
disableNetworkThrottling: true,
view: true
};
@vikramvi
vikramvi / gist:90f04717baf5bb7f348bb74ab75d8882
Created March 14, 2018 16:43
lh1.js ( not working - this is as per documentation )
const lighthouse = require('lighthouse');
const chromeLauncher = require('chrome-launcher');
// process.env.args = " --veiw --disable-network-throttling --disable-cpu-throttling"
// console.log(process.env.args);
function launchChromeAndRunLighthouse(url, opts, config = null) {
return chromeLauncher.launch({chromeFlags: opts.chromeFlags}).then(chrome => {
opts.port = chrome.port;
console.log(lighthouse)
return lighthouse(url, opts, config).then(results => {
@vikramvi
vikramvi / imposter-handbook-links.md
Created April 23, 2018 15:24 — forked from milmazz/imposter-handbook-links.md
Useful links found in The Imposter's Handbook by Rob Conery
@vikramvi
vikramvi / CustomExpectedConditions.java
Created October 8, 2018 06:42 — forked from mt1729/CustomExpectedConditions.java
Some Selenium/Appium helpers to use with PageFactory
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.StaleElementReferenceException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedCondition;
/**
* Define custom ExpectedConditions here.
*/
public final class CustomExpectedConditions {