Monday, December 21, 2015

An awesome message about Blueprint Education to end the year.

As some of you know, I have been helping out the amazing folks at Blueprint Education in Arizona.  They have been making some changes to their culture as a follow-on to a previous introduction to new ideas introduced by John Miller from Agile Classrooms.

I'm getting ready to relax until the end of the year and saw this message in my FB feed this morning and thought..... It would be really cool to share this to inspire others to perhaps try something new in 2016!  

The follow dialogue has some questions about Blueprint Education and then the following statement from Mark...
"Blueprint education is a non profit. Our mission is to inspire students to make better choices and be champions of their own learning. I'm the CEO. We apply the principles of Agile to elementary and high school education."


Mark French FB Feed
(c) Blueprint Education. 2015

For me at least, this is one of the best messages I could have read all year.

If what you read in some of the following posts inspires you, reach out to John Miller or Mark French. I know that either of them would be more than pleased to share what they have been up to or help you learn more about bringing Agile Values and Principles to your education system.

There are some exciting things happening next year at Blueprint and I can't wait to start sharing those! Stay tuned.

For now.. Here is a selection of previous posts to get you up to speed.....


References....

Agile Classrooms

Blueprint Education

John Miller

Mark French


Thursday, December 17, 2015

Mental Model Culture Diagrams

Sometimes the coolest things come when least expected.....

Saravana Bharathi (@AgileKarma) shared the link at the bottom of this message today over at FB.  Thanks !!

Although I am not a fan of the stereotyping in the post...

The picture representations of complex mental thought differences are intriguing and simple to understand.

Imagine if we could facilitate discussions toward commonality using this type of diagram?

I wonder if one could facilitate a team to draw their own diagrams?

I wonder if one could facilitate separate groups in an enterprise to draw their own diagrams to find commonality or places for discussion.

One thing is for certain (to me at least).  The simple diagrams convey a strong message without the need for a large, written report.  

I do have some personal reservations about this accidentally turning into a "categorize everybody into the same group" type thing. 

I do think if the diagrams are created by people as self-representations, stereotyping might not happen.

I'm looking forward to trying something around this idea out.

If anyone tries these diagrams out before me, please let myself (and the community) know how it works out! 

Here's the link.. Enjoy...

http://qz.com/567479/the-cultural-differences-between-east-and-west-according-to-one-artist/

To reach out to Saravana, you could find him here...


https://twitter.com/AgileKarma


https://www.facebook.com/saravana.bharathi



Tuesday, December 15, 2015

Tech Post: Docker, PhantomJS, Selenium on a Jenkins host for pre-production website testing

I recently spent days trying to solve a technical problem when attempting to auto-test a website on my Jenkins server combined with Selenium, Selenium Grid, or PhantomJS on the same machine. 

I had previously been using a different approach for my automated testing and thought I'd do something new for this site :->


I figured out the solution and decided I would share it here should someone find themselves in the same or similar situation.

These instructions apply to Jenkins but will likely also apply for Bamboo, TeamCity or your CI server of choice.

Scenario:  

  • When testing on a developer workstation, the site is started up and tested at localhost: (127.0.0.1).

  • A Jenkins server which runs all tests locally instead of on slaves (the same problem would likely occur on a slave).

  • On a check-in of code, load the site up at localhost on the Jenkins server (as you would expect)

  • Attempt to run Selenium or PhantomJS in a Docker container......

-- FAIL --

  • Spent days researching "headless" build capabilities
  • Spent even more days reading about countless issues with dockerized containers working with Selenium. 

As it turns out, the problem is not related to Docker and Firewalls but the nature of containers.  

The easy (short) answer.....

If you set your tests to run at localhost: or 127.0.0.1, they will work no problems on a developer machine, but when the Dockerized container tries to reach localhost it will look to it's own localhost versus the CI server's localhost... 

Change the tests to use the local IP address of the host instead. I used an environment variable to do this on the host. 

The following sample makes some assumptions (modify as needed)

  • Jenkins Server
  • NodeJS
  • Docker
  • PhamtomJS (the same holds true for Docker versions of Selenium)

Docker:

docker run -d -t -p 4444:4444 --name phantom servebox/phantomjs phantomjs \
--webdriver=127.0.0.1:4444

To see the running container....

docker ps should show you something like.....

aa71e19beecd        servebox/phantomjs   "phantomjs --webdrive"   2 minutes ago       Up Less than a second   0.0.0.0:4444->4444/tcp   phantom

You can now start and stop the container by executing either  (making it easy to control from Jenkins)

docker stop phantom
docker start phantom

Environment Variable Setup (linux)

export TEST_IP_ADDRESS="x.x.x.x" (replace with host address)



NodeJS: (helper.js)


global.testPort = 9005;
var url = "http://" + process.env.TEST_IP_ADDRESS + ":" + testPort;
global.url = url;

NodeJS: (mocha test) 


var webdriver = require('selenium-webdriver');
var expect = require('chai').expect;

var driver = new webdriver.Builder().usingServer('http://127.0.0.1:4444/wd/hub').withCapabilities({
    'browserName': 'phantomjs'}).build();

describe('Click On CEC Logo should bring us to the SA CEC Page', function () {

    "use strict";
    it('should work', function (done) {

        driver.get(url);  //set in helper.js as global
        driver.findElement(webdriver.By.id('CECLink'))
                .then(function () {
                    return driver.findElement(webdriver.By.id('CECLink')).getAttribute("href");                })
                .then(function (linkString) {
                    expect(linkString).equals('https://www.scrumalliance.org/certifications/cec-certification');                    driver.quit();                })
                .then(function () {
                    done();                });    });});
(code not perfectly formatted in this blog post).


Jenkins:

Create a job step to execute a shell with the following commands....
(where x.x.x.x. is the ip address where the LOCAL TESTABLE WEB PAGE is located in pre-production).

docker start phantom
export TEST_IP_ADDRESS="x.x.x.x"      
npm run jenkins-mocha 
docker stop phantom


What Happens:


  • Jenkins launches the docker container called phantom that was previously defined
  • Docker starts up an instance of the phantomjs webdriver at port 4444 on the localhost (in a container)
  • NodeJS starts up the website locally (code not shown in this example) . This site starts at IP address x.x.x.x
  • NodeJS (mocha) loads Webdriver and requests PhantomJS from the Container
  • The Container loads PhantomJS and gives a session for Webdriver
  • NodeJS makes requests to x.x.x.x (instead of localhost)
  • When the tests are complete, Jenkins stops the phantom container