Tuesday, November 12, 2013

Quick Video about Software Testing on Facebook (Selenium on Facebook)

Saturday, August 31, 2013

What I took from IT Security and used on QA Testing

I have met over the years many types of testers. Many types of professionals, with various core skills. Overall, they all fill a group that aims for the same objective, and together, with those various skills, create a more effective team.

I have a developer and very technical background, and worked on IT Security as well. I have brought many of my experiences from there to the Quality Assurance world.

Deep understanding of software, and SFDC, is also a key factor to complement your professional profile, ultimately helping you to be more effective and even efficient, because you may know where to look for bugs, errors, mistakes, and may know in advance how to trigger them due to your experience.

Some of the things I took from IT Security:

  • Breaking software, files, outputs, packets, formats.
  • Secure code.
  • Validate all inputs, always, from everyone.
  • Pay extra attention to how the memory is being used/managed. This greatly changes from language to language.
  • Certain non-functional requirements, often not defined, can make a difference for the acceptance criteria of any software development.

Generate random data sets and/or files with many options

As a Developer and QA, you probably needed a quick data set or file to test a few things or try out some new implementations.

This online tool, also available for download, allows you to do just that. Create your data sets with predefined delimiters, options, parameters and generate the file for download.

Generate Data can be found here.

Tuesday, August 13, 2013

Installing Oracle JDK JRE on Debian / Ubuntu

To install it, you just need to execute the following commands in order. I am assuming a new clean installation.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Wednesday, April 24, 2013

Introduction - Basic testing in Python - Using doctest for function tests

You can use doctest to assert that your functions are returning or producing the output you expected.

Here is a very simple function that just returns (as a float type) the multiplication of 2 integers:

def multiply(a,b):
    """ (int,int) -> float

    >>> multiply(2,3)
    6.0
    >>> multiply(3,4)
    12.0
    """
    return float(a*b)

if __name__ == '__main__':
    import doctest
    doctest.testmod()

The important thing to keep from this basic example is that the function returns the multiplication of 2 ints, and converts its result to a float type. The documentation of the function (enclosed by the three ") explains that the function receives 2 ints and returns a float.

Doctest uses the docstring to test the function.

In this case, the call ">>> multiply(2,3)" runs internally in the Python interpreter, and compares the result with the one we wrote. Then it does the same with the second test. If you pay attention you will see that it is as if we were writing those calls in the console ourselves, but in this case using them from the function documentation (Python calls it docstring).

To put it simply, the body of the "if" function is executed if our module, the one with the "multiply" function, is executed directly, and NOT imported. If it is imported, you will be able to use the "multiply" function, but no tests will be run, nor any code in the body of the if statement.

Finally, all these tests run because we used the "import doctest" and "doctest.testmod()" to run these tests. doctest is the module that has the behavior to execute these test cases.

It is very simple, only to serve as a reference to anyone new to the language. Python is being actively used in the scientific community, so a lot of professionals without actual programming experience are using Python. To them, I will aim some of my introductory posts.

Introduction to BDD/TDD - Behaviour Driven Development and Test Driven Development

Behaviour Driven Development started as an attempt to better understand and explain the process of Test Driven Development.

Test Driven Development is a developer practice that involves writing tests before writing the code being tested. Start by writing a very small test for code that does not yet exist. Run the test and it will fail. Then write enough code to make that test pass. That's the idea!

Not all projects have QA or testing teams, and these methodologies and practices help balance the risk and overall quality of the software being built.

As a developer, it helps to think about all the things that could go wrong with any specific code. This is where you start adding edge or boundary cases for the behavior of your code.

TDD arrives to a point in where some confusion with Unit Testing arises, and certain details create a dependency between the internal structure of the object being tested and the test itself. This, as you can imagine, causes a lot of pain to maintain, and is a reason for test suites to become ignored.

BDD tries to come out of this as an improved way to perform "TDD". The problem with TDD is that it tests what the object is and not what it does. What it does is more important.

This evolution on testing methodologies explained that the test should focus on the behavior of what needs to be done, and not the structural-specific details.

With these, frameworks that encourage focusing on behavior instead of internal structure or values inside the object being tested emerged, such as RSpec. To use it, you need to have some basic knowledge of the Ruby programming language.

Monday, April 15, 2013

Basic process handling in Linux - List, Kill processes of specific user

It is very common to encounter basic commands that are very useful, but you forget how to do them or their syntax (maybe you forget the parameters or all the options they have). Specially if you are not constantly using them.

top command displays in console a list of tasks being handled by the kernel.

If you write top -u <username> you can filter those tasks/processes by username.

If you want to kill all processes for a given user, you can use pkill -u <username>.

As always, you can use the help pages while on the command prompt, such as man <command>, or info <command> or even help <command>.

Sunday, April 14, 2013

Start using Selenium Server - Selenium basics

To use Selenium, you need to download the Selenium Server (only a jar file), and the language-specific client drivers that corresponds to the language of your preference (Java, Python, Ruby, etc.). You find all these in the same place: http://docs.seleniumhq.org/download/

Once you perform all the necessary steps for installation (downloading and installing libraries), on your code you will need to import the libraries that will allow you to interact with the selenium server, and perform your automation tasks.

For basic examples on what can be done and how (with actual code and snippets) you can refer to the official Selenium website: Setting up a Selenium WebDriver Project. They have examples in many languages.

With this automation tool, plus some knowledge of general computer science, you can create many useful scripts, even for personal use. If you think 'automation', think also outside of Selenium by programming general software, and add the possibility of those scripts interacting with Selenium itself, or even, using virtual machines to interact and not disturbing your host machine. If you have enough computer power, you can even multiply these to get parallel computing possibilities.

Another useful thing that many do not realize is that, while using certain scripting languages you require the server to be started, that can also be automated very easily from within the code. You can create processes, threads, and make calls to the OS to run Selenium Server and close it at will.

For people working professionally on testing, they probably already know plenty about automation. Selenium adds possibilities to integrate it's findings, and by enabling us the ability to create behavior and logic with our regular programming abilities, we can create reports on many formats and tools enabling further interaction with other software being used by any company working on software development and testing.

Thursday, March 28, 2013

Python testing tools

Here you will find a lot of Python specific tools for testing different technologies and environments.


You can learn and read more about Python on its main website, http://www.python.org/.

Test Heuristics Cheat Sheet - Data Type Attacks & Web Tests

This document is always useful. It shows techniques and specific checks you can perform while testing certain variable types, systems and data sets.

Even though with time you always kind of know where to find errors, mistakes, bugs and security holes in software and computer systems, there might always be certain things that you just don't have as fresh as you once did. That is why reviewing past experiences and documentation is always crucial to accomplish the best you can do.

You can find the document shared here: Google Docs Shared PDF - Test Heuristics Cheat Sheet

The document was originally created by Elizabeth Hendrickson with some others, her blog: http://testobsessed.com/.

Tool to generate random data in various formats

Did you ever need to generate data or specific files on various formats for any reason?

There is a tool you can find and download in http://www.generatedata.com/ that allows you to do just that. There is an online demo in which you can see how it works and what it can be done with it. It's a free, open source script written in Javascript, PHP and MySQL.

Quick solution to share files or create server instance in Python

There is a simple way to share files via web (by creating a Python server instance) by entering a simple python command:

python -m SimpleHTTPServer 9914

You should run the above command on the directory you want to share.

With this command, the directory where we ran this will be shared (including any sub-directories) in the specified port 9914.

To access the files and folders shared, you only need to open a web browser and navigate to our device's IP address (where this command was executed), specifying the port we chose. In this example, "http://192.168.1.1:9914".

QA Automation Testing Introduction

This blog aims to share information and knowledge about QA, Testing, and Testing Automation.

Even though there are lots of blogs, books, websites and available information on the subject out there, my goal is to keep this content clear, specific and summarized, in the hopes of be a reference in the future for certain cases, for myself and others.

Testing is always needed to ensure that what we are creating or developing works as it should, from a functional perspective (if we are using verification (did we build the product right?) and also, very often, if it is what the end-user, customer or client really required and needed (validation (did we build the right product?)), and with the desired quality.

Testing Automation, also referred just as "automation", is the application of automation processes to perform testing. In Testing, we find that certain tests need to be repeated often and might be simple and/or time consuming. If, for example, you ever worked in a project and needed to perform testing and QA, you know how automation would be useful when performing a regression. This is more notorious on environments and projects where you have new versions and sub-versions of the software often, such as in projects using agile methodologies.