Archive for the ‘Uncategorized’ Category.

JetBrains blogs

Minimalist Software Engineering

Do you approach software engineering as a minimalist?

The fastest code is the code that doesn’t run at all.

Running fewer SQL queries is better than running more queries.

Fewer features means less complexity.

Fewer libraries means less complexity.

Fewer tools means less complexity.

Complexity costs time.

Complexity costs money.

Doing nothing is better than doing something useless.

How To Create A New Composer PHP Package

  1. git init demo-composer-package
  2. cd demo-composer-package
  3. composer init
  4. composer install
  5. composer validate
  6. Follow the guide for your php version https://phpunit.de/getting-started-with-phpunit.htm

Instructional Video Table of Contents (YouTube)

Today I found this link to the  YouTube Iframe API Reference.  I find this interesting because I think that adding something like a table of contents to a video could be super helpful when if you want to reference the video. For example with instructional videos, a table of contents could provide an overview of video segments you might be interested in. It would let you quickly jump around instead of manually searching the video to find the point that you are interested in.
I used to go to user group meetings to find out the latest and greatest in programming and software development.  I could see this API being used after the video is filmed and adding click points.  I always want to tell friends about something that I learned at a presentation, and with the content links I could share the exact point where I liked the content.
I can imagine if video place markers were sharable then we might have metrics where we can see what points of a video are getting the most interest and shares.

Creative Inspiring Motivator

Recently my team at HomeAway got personal profiles done from http://www.insights.com. It was quite a fun process. Under their categorization, I am a Creative Inspiring Motivator.  This is what came back as my key strengths:

  • Outwardly directed energy ensures a fast friendly pace.
  • Creative thinker and dynamic innovator.
  • A natural entrepreneur, inquisitive and adaptable.
  • Builds relationships quickly and effectively.
  • Able to see the larger picture.
  • Takes advantage of opportunities.
  • Ability to see options and alternatives.
  • A visionary generating infectious enthusiasm.
  • Able to turn vision into a reality.
  • Enjoys having lots of harmonious relationships.

Today I met Matz. The creator of Ruby.

This is might not be a big deal for others who have been going to the lone star ruby conference for a while, but I got to finally hear Matz today.

I snapped a quick picture along with two of my team members from HomeAway. I am the guy on the right.

Matz used his keynote to talk about features to come in the next version of ruby such as  scoped monkey patching, module prepending, lazy mapping, and ruby keyword arguments.

He also mentioned mruby, that is coming soon.  I checked out the source and ran the tests. Here is the source link https://github.com/mruby/mruby/

download the source and run ‘make’ and ‘make test’.  You will then find mruby, mirb in the bin directory.

James,Alan, and myself with Matz.

 

Lightning Talk From Selenium Conference

Checkout my lightning talk on SeleniumFury the page object factory for Ruby.
Lightning Talk From Selenium Conference

Going to Software Test Professionals Conference next week.

I am looking forward to my first trip to Las Vegas http://www.stpcon.com/. I will have a chance to meet with other selenium grid users and test out my strategies in test automation patterns. I will be attending all of the topics on agile automation

Selenium Grid Projects

What I have already done to update the ruby example in the Selenium Grid repo. Code Link

  • Updated rspec from 1.1.8 to 1.1.12. I accomplished this by getting the most recent deep-test code  and adding it to the /lib directory. The new version of the deep test code supports rspec 1.1.12. I then just require it in in the rake file. require File.expand_path(File.dirname(__FILE__) + ‘/lib/deep_test/rake_tasks’)
  • The rake file does not need selenium-client 1.2.7. I removed the dependency by  adding the reporting files it was referencing into the lib/reporting  directory. report_formatter_path = “lib/reporting/selenium_test_report_formatter”
  • Updated selenium-client from 1.2.7 to 1.2.18. With the change to the rake file, I am now able to use the most recent version of selenium-client in my specs.

Other helpful tools/tricks I have added to selenium grid (Maybe useful to other Ruby/Grid users)

  • I start and stop the grid from the same rake file that I execute the tests from. Examples are grid:all_start and spec:run_in_parallel
  • Rake tasks can just run and create a HTML report or run and send test results to Rally
  • The tests and rake file runs on OS X, Cent OS, and Windows. (no parallelizaion on windows)
  • Specify command options to the rake tasks to switch between hostnames I am running against. (This is useful when you have more than one instance like test.yourdomain.com and stage.yourdomain.com)
  • Specify to only run tests for specific sites in the test suit. For example if you wrote tests for www.yourdomain.com and www.yourdomain.es.  You can specify which sites to run against
  • I use gem bundler with all grid projects to help control gem installation and versions.  (My Rakefile automatically installs needed gems if you don’t have them)
  • I have a framework for creating ruby classes with selenium locators automatically. I use nokogiri to help with this.
  • Spec test to open ruby classes with locators and create a report of all of the changed selenium locators.

Future Goals

  • Update Deep Test so that it uses the same version(1.2.8) of rspec as the latest version of Selenium-Client. Right now we are at rspec 1.1.12 and selenium client 1.2.18. Selenium-Client 1.2.18 can use rspec 1.2.8.
  • When rspec is updated, I will be able to use the selenium client to provide screen shots if needed
  • Figure out how to create a formatter that allows the Team City and Rubymine spec runners to provide the same test runner template as it does for test in sequence when you run test in parallel in deep test.
    Rubymine Spec Formatter

    Rubymine Spec Formatter

    Team City Test Report

Selenium-Client 1.2.18 has excellent logging and error messages.

I am impressed with the new logging and stability features of  Selenium-Client 1.2.18. One of the most useful improvements is the automatic failure when a page is showing service unavailable.

I used to put a line like this after every browser.open command.

browser.text?("Http/1.1 Service Unavailable").should(be_false)

Now I get a nice error message from the Selenium-Client.
Selenium::CommandError: Response_Code = 503 Error_Message = Service Unavailable