Running Jenkins slave agent under Windows 10 for UI test automation with Testcomplete

The Jenkins slave agent is what enables the test node to execute tests and collect results using Jenkins server. This slave agent runs find under Windows 7 but for Windows 8.1 and Windows 10 this does not work. This is due to the fact tha the user account running the agent, must have a combination of system user rights and still have access to a GUI.

I have discovered by change that the Slave Agent works if it is launched a commandline interface which is run "as administrator". then simply run the following command:

Checking for windows version in a batch file

I just have had the need for checking the Windows version to handle some stuff in a batch file. Here is how it is done:

for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
if "%version%" == "6.3" echo Windows 8.1
if "%version%" == "6.2" echo Windows 8.
if "%version%" == "6.1" echo Windows 7.
if "%version%" == "6.0" echo Windows Vista.
if "%version%" == "10.0" echo Windows 10.
echo %version%
rem etc etc
So it was actually really easy :-)

Testcomplete regular expression replace string working example

This little exampel is a demo of how to use regular expressions within a TestComplete Javascript.
In the string "str", is soem XML example. I desire to substitute the tag and value, with an "Ingored" tag.

function RegExReplaceDemo()
// The String
var str = "<SomeXMLNode>f44a944b-eab6-45af-91fa-5717f654</SomeXMLNode>";
// The regular expression for replacement identification
var re = /SomeXMLNode.*de/gi;
// The string replacing
str = str.replace(re, "/Ingnored");


Tasks that appear in the “tasklist” command will have an executable and process ID (a four-digit number) associated with them. You can force stop a program using “taskkill -im” followed by the executable’s name, or “taskkill -pid” followed by the process ID. Again, this is a bit redundant with Task Manager, but may be used to kill otherwise unresponsive or hidden programs.


The “tasklist” command can be used to provide a current list of all tasks running on your PC. Though somewhat redundant with Task Manager, the command may sometimes find tasks hidden from view in that utility.


There’s also a wide range of modifiers. “Tasklist -svc” shows services related to each task, “tasklist -v” can be used to obtain more detail on each task, and “tasklist -m” can be used to locate .dll files associated with active tasks. These commands are useful for advanced troubleshooting.



Sometimes, you need to know whether or not packets are making it to a specific networked device. That’s where ping comes in handy. Typing “ping” followed by an IP address or web domain will send a series of test packets to the specified address. If they arrive and are returned, you know the device is capable of communicating with your PC; if it fails, you know that there’s something blocking communication between the device and your computer. This can help you decide if an issue is caused by improper configuration or a failure of network hardware.


Entering the command “netstat -an” will provide you with a list of currently open ports and related IP addresses. You’ll also be told what state the port is in – listening, established or closed. This is a great command if you’re trying to troubleshoot the devices your PC is connected to or you’re afraid you’re infected with a Trojan and are trying to locate a malicious connection.


This command relays the IP address that your computer is currently using. However, if you’re behind a router (like most computers today), you’ll instead receive the local network address of the router.

File Compare using Windows

This command can be used to identify differences in text between two files, and is particularly useful for writers and programmers trying to find small changes between two versions of a file. Simply type “fc” and then the directory path and file name of the two files you want to compare.


You can also extend the command in several ways. Typing “/b” compares only binary output, “/c” disregards the case of text in the comparison, and “/l” only compares ASCII text.

So, for example, you could use the following:

Enabling GodMode for Windows 10

In Windows 10, settings and controls are divided between the new Settings menu and the traditional Control Panel. Some settings -- including touchscreen-specific settings and Windows Update -- are found only in the Settings menu, while others, such as the Device Manager, are still mostly accessed through the Control Panel.
Windows 10 has its own GodMode. GodMode for Windows 10 gives you access to 262 new god-like powers. And, while it doesn't give you unlimited lives or save you from bluescreens, it does expose some additional features and tools to play with.

Awesome Excel 2016 Shortcuts

1. Navigate Worksheets
Arrow Keys Navigate by one cell at a time in any direction
Page Down/Page Up Move one screen down/ up
Alt+Page Down/Page Up Move one screen right/ left
Tab/Shift+Tab Move one cell to the right/ to the left in a worksheet
Ctrl+Arrow Keys Move to the edge of next data region (cells that contains data)
Home Move to the beginning of row
Ctrl+Home Move to the beginning of worksheet
Ctrl+End Move to the last cell with content of worksheet
Ctrl+G Display the GoTo dialog box

Creating a Testcomplete build step in Jenkins with Job DSL which executes all function i a Testcomplete unit file

I have been working with Jenkins CI for some weeks, and we have grown out own the Jenkins Plugin for handling TestComplete tests as a test step. So I have created a dynamic creation of a job in Jenkins.

JavaScript and Python, and their simple differences

A note:

[DRAFT] Differences between Javascript and Python.

Beneeth describes a bit going through the syntax of code.




comment */
// one-line comment
var x = 1; // inside line comment


"""Multiline comment
Only as docstring
# one-line comment
x = 1 # inside line comment

Code Blocks

JavaScript uses curly brackets to denote code blocks.

Find the last modified file in a folder using JavaScript in TestComplete

A quick script to find the lastedt modified file in a specified folder. Works really nice.

Goes thru a folder and finds the last modified file with a sertain filename
Param FolderPath String: The Path to the folder to look in
Param FilNameContains RegularExpression: The file name to match (write the regular expr // if you want to find all)
Return String with the full path to the last modified file

Boundary Value Analysis (BVA)

A boundary value is any input or output value on the edge of an equivalence partition.
Boundary value analysis (BVA) is based on testing at the boundaries between partitions.
Here we have both valid boundaries (in the valid partitions) and invalid boundaries (in the invalid partitions).

Multiple Condition Coverage (MCC)

Multiple Condition Coverage is also known as Condition Combination Coverage, or MCC.
MCC coverage takes the structure of a decision into account.
Each decision is made up from conditions, which are combined by logical operators (and, or, not).
Roughly spoken, to get 100% MCC for a decision, all combinations of true and false for the conditions in the decision have to be evaluated.
In Multiple Condition Coverage for each decision all the combinations of conditions should be evaluated.

Modeling GUI structures with GraphWalker

I wrote prior to the release of GraphWalker 3. So keep in mind the not all information in this article is valid for GW3. I'll make an updated version soon.

When modeling for a GUI of a system. It can be hard to find the best way for representing the modeled behavior on the system.

One have to think about haw to model what the tests interacts with. For bigger structures there are several approaches. Here are two approached, which are
frequently applied.

Modeling for GraphWalker 201

I wrote prior to the release of GraphWalker 3. So keep in mind the not all information in this article is valid for GW3. I'll make an updated version soon.

JavaScript Enabled Modeling

I have played a little around with GraphWalker and JavaScript enabled models for ESFM. The “-j” option


Enable JavaScript engine

java -jar graphwalker-2.6.3.jar offline -f MBT201.graphml -g RANDOM -s REACHED_VERTEX:End -j > output.txt –x



Modeling 101 for GraphWalker

I wrote prior to the release of GraphWalker 3. So keep in mind the not all information in this article is valid for GW3. I'll make an updated version soon.

Here under some examples on hos to model different “code” structures.

The following examples are without any Graphwalker related constraints. This is only intended for showing how to model the structures. So no Guards,
weights and javascript enabled in these model exambles.

Model Based Testing with GraphWalker 2

I wrote prior to the release of GraphWalker 3. So keep in mind the not all information in this article is valid for GW3. I'll make an updated version soon.

Model-based testing is a new and evolving technique for generating a suite of test cases from requirements.

Testers using this approach concentrate on a data model and generation infrastructure instead of hand-crafting individual tests.

Model-based testing depends on three key technologies:

Ending a test in Model Based Testing with GraphWalker

When modeling is might not always be the best implementation of the model to force all the test to end in the same state. (But is it more manageable to model with this thought in mind.)
Sometime the test need to stop when a specific condition arises.
A stop-condition, is a stop criteria for a given generator. It will halt the generation of a test sequence when the given criteria is reached.
GraphWalker support the following stop conditions.

yED - Free Modeling Tool

yEd is a powerful diagram editor that can be used to quickly create diagrams manually or import external data for analysis and auto-magically arrange even large data sets by just pressing a button. You can use yEd to quickly create flow charts, BPMN and UML diagrams, organization charts, mind maps, and many other kinds of diagrams, graphs, and networks. Choose from a wide range of highly sophisticated layout algorithms to automatically arrange diagrams in no time. An intuitive and visually appealing user interface makes creating diagrams fun.