knowledge is power

Month: June 2015

Jasmine is a free JavaScript testing framework for BDD (Behavior Driven Development). In my opinion Unit-test should be written by developers, but tester you need also to know! This tutorial give you a hint how to use it.

Preparation

Download latest standalone version directly from GitHub and unzip. Now you have some files and folders. The file “SpecRunner.html” and “spec”, “src” folders are important for us. Some examples are allready included. If you run the “SpecRunner.html” in your browser, you can see the first example results. A look inside this examples help you understand Jasmine!

Short Introduction

In the “src” directory, are the things to be tested. The “spec” directory has the tests. The “SpecRunner.html” link to the all files. The comments describe what you should do. Whenever you want to run the tests, you simply need to load or reload.

Example

Delete all files into “src” and “spec” folders. Create on “src” folder a new file.

MTR is a network diagnostic tool which combine the best from Ping and Traceroute. It helps software tester to diagnose network performance and create helpful reports. By mtr, you could also monitor the network. It sends ICMP ECHO requests to a destination and listens for the answers. Mtr works on both command-line and GUI (depending to installation method).

Installation

Shell

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

# Debian/Ubuntu (text-version only)

$apt-getinstall mtr-tiny

# Debian/Ubuntu (gui and text-version)

$apt-getinstall mtr

# RedHat/CentOS/Fedora (text-version only)

$yum install mtr-tiny

# RedHat/CentOS/Fedora (gui and text-version)

$yum install mtr

# Mac OS X (Homebrew)

$brew install mtr

# Mac OS X (MacPorts)

$port install mtr

The mtr project is on GitHub. If you like to compile mtr by your self.

Developers should follow not only the rules and processes of quality assurance. They must also have advantages for motivation from QA! As QA, you can already achieve more with less. Templates would be a possibility. This guide shows you how to deploy templates for Vim.

Preparation

In order to provide templates, check if the personal vimrc file exists. Do not use the global vimrc! Whatever you configure in the personal vimrc file will overrule any setting in the global vimrc file.

Shell

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

# start vim

$vim

# the global vimrc file can found by

:echo$VIM

# the home directory can found by

:echo$HOME

# the personal vimrc can found by

:echo$MYVIMRC

# exit vim

:q!

# if no personal vimrc exists

$touch/home/<user>/.vimrc

# create folder for templates

$mkdir/home/<user>/templates

Create some templates

Now place some files with in the templates directory.

html.tpl

XHTML

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

<!DOCTYPE html>

<html lang="">

<head>

<title></title>

<meta charset="UTF-8">

<meta name="description"content="">

<meta name="author"content="">

<meta name="keywords"content="">

<meta name="robots"content="noindex,follow" />

<meta name="viewport"content="width=device-width, initial-scale=1">

<link href=""type="text/css"rel="stylesheet" />

</head>

<body>

<!-- Content goes here... -->

</body>

</html>

py.tpl

Python

1

2

3

4

5

6

7

8

9

10

11

12

13

#!/usr/bin/env python

# -*- coding: utf-8 -*-

"""Missing docstring"""

classLorem(object):

"""Missing docstring"""

def__init__(self):

"""Missing docstring"""

if__name__=='__main__':

and so on… . Open the personal vimrc file and add the following auto-command.

Shell

1

2

3

4

5

6

7

8

9

10

11

12

13

14

# open personal vimrc

$vim/home/<user>/.vimrc

# change into insert mode

i

# add command

autocmd BufNewFile*silent!0r$HOME/templates/%:e.tpl

# exit insert mode

<ESC>

# store change and close

:x

Whenever a Developer create now a new file, Vim looks for a template that matches the extension of the file. If there is no template for the file type, then Vim simply creates an empty file as usual.

Of course it is better to test webpages directly on devices, but in case of costs not possible. A first good and cheap possibility is the use of online resources, next to browser Add-ons. Developer and software tester can use this services for a good impression. In most cases, the specifying of the URL and sizes are sufficient. This topic show some good free services. Which is the right one for you, you must decide for yourself .