If you use Python virtualenv, pylint and lxml together, you may see error messages in pylint test results. It`s because only trusted C extension resources (the standard library) should be used. Here is an opportunity to improve the pylint test results.
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=lxml
If you now perform the pylint test again, no error relating to lxml should appear.
Taurus from Blazemeter seems really to have a potential to be a star. There are new and easy ways to ease the workflow with JMeter. It allows, for example, configuration options and reports which JMeter does not offer by default.
Installation
# install via pip
$ sudo pip install bzt
On error look for installed libxml2 and libxslt libraries!
Create a JMeter testplan with “User Defined Variables”, one “Thread” with one “HTTP Request Defaults” and some “HTTP Requests”.
On “User Defined Variables” – “Name” insert “MY_TARGET_HOST” this value will be set by Taurus YAML file.
On “HTTP Request Defaults” – “WebServer” use the variable (MY_TARGET_HOST).
Running JMeter test
# running headless by yaml file
$ bzt example.yml
# running headless by jmx file
$ bzt example.jmx
# running with JMeter GUI by yaml file
$ bzt example.yml -gui
# running with JMeter GUI by jmx file
$ bzt example.jmx -gui
Two folders will created on each test run. “report” (configured in YAML) and “Artifacts” (as Date/Time string). Attention – report.xml will replaced on each run!
This time i will present 2 tutorials in one. One part describe how to create a simple Python package. The other part gives security testers a hint for sensible data. It is recommended to work with python virtualenv!
Preconditions
Python 2.7.x
pip, virtualenv, setuptools
Skype
Background
Skype stores sensible data, unencrypted, in a simple sqlite database (main.db). You would be surprised what information can be found there!
Example Locations
Mac OS – /Users/Library/Application Support/Skype/main.db
Windows – C:\Documents and Settings\Application Data\Skype\main.db
This time i want show you how to create your own REST testing application. For this demonstration i use Python, Tkinter and some Python libraries. At the end of this tutorial you can extend the application with more features like “show headers”, “store requests/responses”, “run automatically” and so on.
Now it`s on you to improve this tiny application! As example you could add file and/or database export, add more functionality or just improve the GUI.
# install on Debian/Ubuntu/Mint
$ sudo aptitude update
$ sudo aptitude install python-pip python-virtualenv
# install on Mac OS
$ sudo easy_install pip
$ sudo pip install virtualenv
Example
Create (if necessary) a new “Freestyle Project” and configure as needed build-paramaters , VCS and etc. On section “Build” – “Execute Shell” insert following script.
# set variable
ExampleENV="${WORKSPACE}"/.ExampleENV
# delete folder and content if exists
if [ -d "$ExampleENV" ]; then
rm -fr "$ExampleENV"
fi
# create new virtualenv
virtualenv --no-site-packages "$ExampleENV"
# activate virtualenv
. "$ExampleENV"/bin/activate
# CODE FOR VIRTUALENV...
With only two python libraries and some line of codes, you are able to create very nice test-reports in PDF format. This tutorial should give you a hint. Feel free to improve with your requirements.