Skip to content

Instantly share code, notes, and snippets.

View sergebug's full-sized avatar

Serge Zukov sergebug

View GitHub Profile
@sergebug
sergebug / readme.md
Last active November 15, 2018 17:47
webdriver browser log reading for javascript errors

Add log level to desired capabilities:

        DesiredCapabilities capabilities = DesiredCapabilities.chrome();
        LoggingPreferences loggingprefs = new LoggingPreferences();
        loggingprefs.enable(LogType.BROWSER, Level.SEVERE);
        capabilities.setCapability(CapabilityType.LOGGING_PREFS, loggingprefs);

Create new instance of the webdriver using the capabilities above

@sergebug
sergebug / jmeter.results.functional.xsl
Created February 17, 2017 17:44
Functional test report for JMeter XML output
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="no" encoding="UTF-8" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/testResults">
<html lang="en">
<head>
<meta name="Author" content="shanhe.me"/>
<title>JMeter Test Results</title>
@sergebug
sergebug / FitNesseSuites.groovy
Created June 10, 2015 21:12
Jenkins Groovy Axis snippet to generate AXIS based on the FitNesse suite names
def dir = new File('c:\\tools\\FitNesse\\FitNesseRoot\\AcceptanceTests')
def result = []
dir.eachFile {
if ((it.isDirectory())&&!(it.name.contains("SetUp"))) {
result << it.name
}
}
return result
// If list of causes is not empty, then cancel email
// Will NOT sent email notification by Jenkins email-ext plugin when job was executed by another upstream job.
// The idea is to avoid multiple notifications from both upstream and downstream jobs.
try {
if (build.getCauses.size()>0) {
cancel = true
}
} catch(e) {
cancel = true
}
@sergebug
sergebug / FitNesse.xslt
Created June 10, 2014 05:34
XSLT to convert FitNesse XML output into jUNIT XML. Could be used for custom transform in xUNIT Jenkins plugin.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:element name="testsuite">
<xsl:attribute name="tests">
<xsl:value-of select="sum(testResults/finalCounts/*)" />
</xsl:attribute>
<xsl:attribute name="failures">
<xsl:value-of select="testResults/finalCounts/wrong" />
</xsl:attribute>
@sergebug
sergebug / fitnesse-failonly.jelly
Created March 12, 2014 22:15
Jelly template which doesn't report green tests.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define">
<html>
<head>
<title>${project.name}</title>
<style>
body table, td, th, p, h1, h2 {
margin:0;
font:normal normal
100% Georgia, Serif;
background-color: #ffffff;
@sergebug
sergebug / fitnesse.jelly
Created March 12, 2014 21:04
jelly template to email FitNesse test results using email-ext plugin from Jenkins
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define">
<html>
<head>
<title>${project.name}</title>
<style>
body table, td, th, p, h1, h2 {
margin:0;
font:normal normal
100% Georgia, Serif;
background-color: #ffffff;
@sergebug
sergebug / content.txt
Created July 13, 2013 03:51
Javascript to implement collapsible tables for Finesse.Net. A poor-man imitation of the SLIM goodness.
# Add this script to the PageHeader
# to get an example - uncomment table below.
#|Some Fixture |
#|ignore|This is comment click on it to show hidden line|
#|some method|This line will be hidden |
#|ignore|This is second not hidden line |
#|some method|This is hidden unless you click ... |
#|some method|... on the second not hidden line |
#
#!-<script src="/files/javascript/jquery-1.3.2.min.js"></script>-!
@sergebug
sergebug / README.md
Last active December 19, 2015 14:59
FitNesse WIKI page for creating tag cloud based on the WIKI page Tags.