Thursday

Setup github within a company's firewall



If you have installed gitbash or windows git setup and are getting the 443 or 407 errors everytime you clone you are on the right post:

Steps to solve the issue:

  1. You will need to update the git config with proxy settings
  2. To do this find your proxy and port using this post here : http://superuser.com/questions/346372/how-do-i-know-what-proxy-server-im-using
  3. Alternatively you can also look at the proxy settings/LAN settings to find this http://wpad.[domain]/wpad.dat 
  4. Paste http://wpad.[domain]/wpad.dat in the browser and you will have a text file in which you can find the proxy:port for all domains used by your company
  5. In your gitbash run this command :
    1. git config --global http.proxy http[s]://userName:password@proxyaddress:port
    2. git config --global http.sslverify false
  6. If you get this error - could not resolve proxy some@proxyaddress:port. It's your password having an @ symbol in it.
    1. Encode @ in your password to %40 because git splits the proxy setting by @

git config --global http.proxy http[s]://userName:password(encoded)@proxyaddress:port

That's your solution right there! 
It never felt so good to clone repos before this :)





Tuesday

Test Automation for the REST API

With the REST architecture taking over the old MVC patterns, most API started using just one way to communicate with HTTP. Suddenly the business logic and any kind of data processing was done at the server and the client side was only responsible for representation of data and basic manipulations.


Testing of the REST API layer can be done using the REST-assured library that was developed by jay-way company. RESTful APIs generally are of two types: one returning XML responses and one returning JSON response. The assured - lib supports POST, GET, PUT, DELETE, OPTIONS, PATCH and HEAD requests and can be used to validate and verify the response of these requests.



You can add a flavor of BDD by using tools like cucumber or specflow:

When /^I send a GET request for "([^\"]*)"$/ do |path|
  get path
end

When /^I send a POST request to "([^\"]*)" with the following:$/ do |path, body|
  post path, body
end

When /^I send a PUT request to "([^\"]*)" with the following:$/ do |path, body|
  put path, body
end

When /^I send a DELETE request to "([^\"]*)"$/ do |path|
  delete path
end

Then /^the response should be "([^\"]*)"$/ do |status|
  last_response.status.should == status.to_i
end

Then /^the response JSON should be:$/ do |body|
  JSON.parse(last_response.body).should == JSON.parse(body)
end

Thursday

GitLab for storing the test automation code within the firewall


GitLab is an open source clone of the popular GitHub service. The best possible thing is to have your own private GitLab installation running locally on your server or network, or even on your local machine in a VM.
Unlike GitHub or BitBucket, you host the GitLab installation yourself on servers you control.

The best part is that it is free under the MIT license.

What's bad with self hosting?
Unlike GitHub, or even a version of GitLab hosted on a normal server, your local GitLab installation will only be accessible to you and this defeats the point of having a version control system with powerful collaboration features like merge requests, but for individuals who just want project and source code management, this will be a powerful solution.

How to Install?
The omnibus package - https://about.gitlab.com/installation/
 Reason -  Omnibus GitLab takes just 2 minutes to install and is packaged in the popular deb and rpm formats.

Tuesday

Repost - All About Mobile Continuous Integration


CI’s not a new thing. Wikipedia says the phrase was first used back in 1994, way before modern mobile apps. Today it’s commonplace in many dev shops for developers to expect that their code is automatically tested when they commit and even automatically deployed to a staging environment.

Tools For Mobile CI
There’s been a lot of progress over the last year or two on mobile CI tools.  Testing frameworks have come a long way and now there are a handful of hosted CI platforms designed to make setup as easy as possible.  Here are a few of my favorite tools:
  • Hosted CI Platforms:
    • Ship.io: The first CI solution to market focused specifically on mobile.  Ship has an easy to use setup process, and supports both Simulators and Real Devices for testing.
    • Greenhouse CI: A newcomer, also focused specifically on CI for mobile applications.  Greenhouse has a well designed UI that makes it easy to use for less technical team members.
    • Travis CI: Popular, robust CI platform with support for OSX based infrastructure.  Configuration process is driven by a YAML file so it’s a bit less friendly than the UI offered by Ship and Greenhouse.  That said, some folks prefer YAML.
  • Testing Frameworks:
    • XCTest: This unit testing framework first debuted in Xcode 5 and replaced the older OCUnit framework.  Since it’s baked right into Xcode it’s become the “default” go-to framework for many people.  XCTest has a solid feature set and is relatively straightforward to learn and start using.
    • JUnit: The corresponding “Out Of The Box” solution for Android developers. Similiarly it is tightly integrated with Eclipse and Android Studio but can also be run from the command line using Grandle or Ant.
    • Appium: Developed by Sauce Labs, Appium is a popular cross-platform framework that allows you to write tests that run on both iOS and Android.  Another big plus is that it’s based on Selenium so folks who have worked w/ this in the past will find it a familiar transition.
    • KIF: “Keep If Functional” (KIF) is an iOS-only Functional Testing framework with a strong focus on usability.  If you’re looking to write tests that reproduce user behavior at the UI-level (vs unit tests) I strongly recommend taking a look at this one.

Tuesday

Manual Test runner for BDD - Good Idea?


The idea is to :

Given we work in a BDD environment

When we write a test case that we may not automate

Then We will write it in Gherkin anyway

Exploring tools like cucumbumbler - https://github.com/TimWalker/cucumbumbler/wiki


If anyone comes across anything better please share J

Update:  X-ray was as close as it could get!



Are you a test automation nerd?




source: http://takeagile.com/2014/05/13/data-science-melbourne-launch/

Friday

Bugs!



Source: http://infiniteundo.com/post/115910731603