Jenkins jobDSL: simple questions and answers

During getting with Jenkins jobDSL I faced some questions.

It took time to find right solutions so to save your time I post some tips in question-answer manner.

I hope it will help you in your difficult automation path.

 

 

How to use Jenkins parameters in groovy code?
Sample code:

...

// define parameters as
parameters {
    stringParam('VERSION', '10.2.0.0', '')
    stringParam('BRANCH', 'master', '')
}

...

// use it like this

branch('remotes/origin/pr/\$BRANCH/merge')

Continue reading “Jenkins jobDSL: simple questions and answers”

Selenium IDE: bad practices of lazy test engineer

Once upon a time it was nothing serious to do. So let’s find out how QA engineers without good programming skills can use the power of Selenium. Surely you know about Selenium IDE Firefox browser plugin. It is useful for simple automation routine. But what if you need to run tests with various parameters? Loop around array? So then search helped me to find out the following.
Continue reading “Selenium IDE: bad practices of lazy test engineer”

Jenkins: running FlexUnit tests on headless Centos 6.7 x64

Recently I was asked to configure the FlexUnit test execution upon our Jenkins CI, but all our executors located in the cloud.
Below is a brief summary of the items that need to be installed and setup.

Installation and configuration

Flash

First of all one need flash player on board. To get sources follow Abode downloads page and on that page you need this particular link https://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_sa.i386.tar.gz. Actually, I didn’t success in debug version installation due t0 some ssl lib compatibility problems.
Once you have downloaded libraries, unpack it:

Continue reading “Jenkins: running FlexUnit tests on headless Centos 6.7 x64”

Data types and web specific test cheat sheet

Data types

Paths/files
■ Long name(>255 chars) ■ Special characters in name(space * ? / \ | < > , . ( ) [ ] { } ; : ‘ “ ! @ # $ % ^ & \n \t \r) ■ Non-existent ■ Already exists ■ No space ■ Minimal space ■ Huge file ■ Write-protected ■ Unavailable ■ Locked ■ On remote machine ■ In network ■  File URL ■ Corrupted ■ File without extension ■ Unsupported format

Time and date
■ Timeouts ■ Time difference between machines ■ Crossing time zones ■ Leap days ■ Always invalid days(Feb 30, Sept 31) ■ Feb 29 in non-leap years ■ Different formats(June 5, 2001; 06/05/2001; 06/05/01; 06-05-01; 6/5/2001 12:34) ■ Daylight savings changeover ■ Reset clock backward or forward

Numbers
■ 0 ■ 32768(2¹⁵) ■ 32769(2¹⁵) + 1 ■ 65536(2¹⁶) ■ 65537(2¹⁶) +1 ■ 2147483648(2³¹) ■ 2147483649(2³¹) + 1 ■ 4294967296(2³²) ■ 4294967297(2³²) + 1 ■ Scientific notation(1E-16) ■ Negative ■ Floating point/decimal(0.0001) ■ With commas(1,234,567) ■ European style(1.234.567,89) ■ All the above in calculations ■ Fractions(1/3)

Strings
■ Long(255, 256, 257, 1000, 1024, 2000, 2048 or more characters) ■ Accented chars (àáâãäåçèéêëìíîðñòôõöö, etc.) ■ Asian and other languages chars  ■ Common delimiters and special characters( “ ‘ ` | / \ , ; : & < > ^ * ? Tab ) ■ Leave blank ■  Single space ■ Multiple spaces ■ Leading spaces ■ End-of-line characters (^M) ■ SQL injection( ‘select * from customer ) ■ JavaScript injections ■ With all actions (entering, searching, updating, etc.)

General
■  Violates domain-specific rules (an ip address of 999.999.999.999, an email address with no “@”, an age of -1) ■ Violates uniqueness constraint

Continue reading “Data types and web specific test cheat sheet”

Case study: moving from stone age TestComplete Flex GUI automation to Flex UI Selenium

It happened that on one of our company projects we needed to support legacy GUI, coded using stone age Flex, version 3.5(current version of Apache Flex is 4.14.1). So after few meetings we decided to change testing tool from unstable and slow TestComplete executions to Selenium.

TestComplete tests were used for two main things:

  1. To prepare and configure servers for further functional testing of another system component(configuration routine consists of interaction with SOAP web services, PostgreSQL BD injections, replacements in xml and properties files, copying files and etc.).
  2. GUI acceptance tests(End-to-end test, acceptance use cases automation).

Continue reading “Case study: moving from stone age TestComplete Flex GUI automation to Flex UI Selenium”

Jacoco: configuring Jenkins job to count coverage for project with subprojects

It happened that our project faced problem with identifying code unit test coverage on every build basis. To put it into CI flow we decided to use JaCoCo. JaCoCo is a free code coverage library for Java, which has been created by the EclEmma team. One can find documentation, download and see sample reports by following link http://www.eclemma.org/jacoco/ . Continue reading “Jacoco: configuring Jenkins job to count coverage for project with subprojects”