Skip to content

Instantly share code, notes, and snippets.

View lazytesting's full-sized avatar

Maarten Groeneweg lazytesting

  • Mirabeau
  • Netherlands, the
View GitHub Profile
@lazytesting
lazytesting / package.json
Last active November 23, 2016 18:59
Quick webdriver script
{
"name": "wd",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
param (
[string]$instances = 10
)
docker rm -f selenium-hub
docker run --restart=always -d -p 4444:4444 --name selenium-hub selenium/hub:3.0.0-dubnium
$i=0
while($i -ne $instances)
{
#!/bin/bash
DIRS=$(find . -maxdepth 3 -name "package.json" -printf "%h\n")
for d in $DIRS
do
( cd $d && NPM i )
done
@lazytesting
lazytesting / notify.ps1
Created August 17, 2016 08:20
notify slack on failed teamcity build
function Test-TeamCityBuildStatus
{
param
(
[string] $ServerUrl ="[TC server url]",
[string] $UserName = "[tc user]",
[string] $Password = "[TC password]",
[string] $BuildTypeId = "[build id]"
)
@lazytesting
lazytesting / check-site-alive.ps1
Created July 21, 2016 09:27
ping site until it is alive (usefull to warm up your site after a deploy)
param (
[string]$url = "",
[int]$maxRetries = 5
)
$SecondsDelay = 10
$retrycount = 0
$completed = $false
@lazytesting
lazytesting / readme.md
Last active July 21, 2016 08:44
run selenium grid

install JDK

1.install chocolatey

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

2.open new cmd window and run

@lazytesting
lazytesting / restore_sql_sb.cs
Created September 8, 2015 11:02
database restore
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Configuration;
using System.Data.SqlClient;
namespace Nvm.Web.FunctionalTests.Support
{
[TestClass]
public class Init
{