The power of cURL for software tester

One of my favorite language for testing is cURL. As soon as I have to do with RESTful applications or simple HTTP, it’s my first choice. Here I show only a small selection of cURL options.

Basic examples:

Basic HTTP Get request

Download`s

Follow redirects

HTTP referer

Resumed transfer offset (continue download)

Show response header

Change request method

Set request headers

Advanced examples:

Send a JSON request

Use a file with JSON content

Specify HTTP multipart POST data (JSON and image)

Write output (show status and time total)

Simple server authentication

FTP

Ignore SSL certificate error

For more information see help and man pages!!!!

Start – Stop Apache HTTP server by click

Usually, you start and stop the apache server by the terminal on Mac OS X.

Example:

But with the Automator, you can do it by simple click.

Steps:

Start the Automator and select “Application”.

automator apache

Now insert the action “Run AppleScript” from library into workflow window.

automator apple script

Insert the following script and save your application.

As a small highlight you can change the icon. Select your app and press “CMD” + “i”. Now drag an other icon file on place of Automator icon.

automator icon

Improve your daily workflow

As a test manager I have to check every day, many test results in my browser. With the Automator i can save time.

Steps:

Start Automator and select “Application”

os x automator

Select “Internet” on “Library” and double click “Get Specified URLs” to get the action into the workflow window. Now insert all URLs.

automator get specific url

Add in the “Display Webpages” action and save it.

automator display webpages

Attention: default path is “/Users/<username>/Library/Services/”, but you can save it on other locations, too.

automator application

Layer 2 discovery on same subnet

A little tip for penetration testers to scan their own network with arping (Layer 2 discovery).

Preparation

Example

Usage

Now we use ARP (Address Resolution Protocol) to discover.

 

Small helper for iOS automated test 2

The second part shows how to obtaining device property informations.

Helper

Example

 

Integrate pylint in PyCharm

This tutorial shows, how to add pylint into PyCharm.

Preparation:

The easy way…

Steps:

Open “Settings > Tools > External Tools” and press the “+” button.

pycharm external tools

Insert values

Inserts good values on name, description and select your favorite group. Enable more or less all checkboxes. Down the “Tool settings” insert program “pylint”, your specific parameters and working directory.

pycharm pylint

After press “OK” pylint integration is ready.

Extended

To be a little more flexible, you can use PyCharm macros. As an example use the value “$FilePath$” for Working directory and “$Promt$” for Parameters. This allows the use in other projects, too.

pycharm macros

Running PyCharm on Yosemite

Your current Java version is greater than 6 and you get after starting PyCharm an error dialog, the following solution helps.

Check your Java Version

Open PyCharm settings

Edit XML

Now you can start PyCharm

Query kernel variables

Show all

Check for 64bit compatibility

Check brand and speed

Check for VT-x