Skip to content

Instantly share code, notes, and snippets.

Avatar

Dmytro Makhno dmakhno

View GitHub Profile
View merge_junit_results.py
#!/usr/bin/env python
#
# Corey Goldberg, Dec 2012
# Dmytro Makhno, Mar 2015
#
import os
import sys
import xml.etree.ElementTree as ET
View python.py
#!/usr/bin/env python
# Copyright Jon Berg , turtlemeat.com
# Modified by nikomu @ code.google.com
# Updated for Python 2.4 (dmitry.zamaruev@gmail.com)
# Usage example:
# start server in required directory: python serve.py
# upload file to server: curl -F "upfile=@some.file.pdf" http://127.0.0.1:8080/
@dmakhno
dmakhno / run_log
Last active Aug 29, 2015
Paralleling tests
View run_log
$ nosetests --processes 5 test_debug_parallel.py
INFO - heavy operation is beginning... 1 FirstTest
INFO - heavy operation is beginning... 1 SecondTest
INFO - heavy operation is beginning... 1 ThirdTest
INFO - heavy operation has ended 1 FirstTest
DEBUG - 47620 140735328031504 1396607234.95 setUpClass 1 FirstTest
INFO - heavy operation has ended 1 SecondTest
DEBUG - 47621 140735328031504 1396607234.96 setUpClass 1 SecondTest
INFO - heavy operation has ended 1 ThirdTest
DEBUG - 47622 140735328031504 1396607234.98 setUpClass 1 ThirdTest
View readme.md

You need:

Define module constuructor in init.py

import os
from selenium_utils.page import PageBuilder

from selenium_utils import read_utils_config
from selenium_utils.screenshot import WebScreenShotUtil
from selenium_utils.splinter_wrapper import SplinterDriver, SplinterFactory
@dmakhno
dmakhno / correct.out
Created Mar 15, 2013
Broken ScalaTest Stream
View correct.out
[info] parallel1Test:
[info] for Config1
[info] - Phase 1 (1 second, 191 milliseconds)
[info] - Phase 2 (1 second, 5 milliseconds)
[info] parallel19Test:
[info] for Config19
[info] - Phase 1 (1 second, 190 milliseconds)
[info] - Phase 2 (1 second, 7 milliseconds)
[info] parallel20Test:
[info] for Config20
@dmakhno
dmakhno / parallel.scala
Last active Dec 14, 2015
dynamic parallel ScalaTest
View parallel.scala
class SequentialTest(alias:String) extends FreeSpec with CancelAfterFailure {
"for %s".format(alias) - {
"Phase 1" in {
for (j <- 0 until 10) {
println("%s: working %s Phase-1 %s".format(new DateTime(),alias,j))
Thread.sleep(100)
}
}
"Phase 2" in {
for (j <- 0 until 10) {
You can’t perform that action at this time.