Manish Chakravarty's Blog

Thoughts. Musings. Suggestions, Ramblings


Previous Entry Add to Memories Tell a Friend Next Entry
Writing a book on selenium: Outline
[info]manish_chaks


Chapter 1 - Introduction
Goals
• Introduce participants to each other
• Establish the goals of the program
• Do a “warm up” on selenium
• Setup Environment ( IDE, repo etc )
Architecture

Chapter 2: Selenium Core
Goals
User should be able to…
• Write a simple test case in Selenese
• Demonstrate understanding of core and core-less
• Demonstrate understanding of core profiles
• Familiarity with various JS files
• Demonstrate how to build and deploy core part to Maven
Agenda
• Building the Selenium Core
Outline
• Explain the source tree layout
• Create sample HTML page
• Create Selenese test case
• Include the test case in the actual suite ( conditions configure for
specific browser etc)
• Building the selenium core
• Describe conversion
• looking at pom.xml for selenese ant task
• Describe important JS files which are part of Selenium Core.
• Describe how Selenium coreless creates profile
• Firebug
• Windows Registry
• difference between PI mode and non PI mode ( diff between the JS
files being loaded )
Links
• Starting with Selenium
• Setting up Apache on OS X
• Ajax Testing with Selenium using waitForCondition
• Agile Testing with Selenium

Notes
browser launcher, launcher util, WindowsUtils, creation of firefox
profile and extension, ie registry modification, fire bug extension,
fire fox 3 patch, iedoc.xml geberation with rhino
selenium-api.js, selenium-browserbot.js, selenium-remoterunner.js,
selenium-testrunner.js, different between PI mode loading and non-pi
mode loading of js files

Chapter 3 – Selenium Server
Goals
User should be able to demonstrate understanding of
• the source structure of Selenium Server
• how selenium server and selenium core talk to each other (Incase of
selenese test case – selenium-testrunner.js and driver commands )
• diff context paths in the selenium server
• how selenium server handles requests
Outline
• Talk about source structure of SS ( talk about selenium server =
(SeleniumCore +SeleniumCoreLess ))
• Describe architecture of the Selenium Server
• Describes the commands Selenium Core sends to Selenium Server
( Excercise: Do this with FireBug; involve students )
• How selenium server handles selenese test cases
• How selenium server handles test cases driven by driver
• Talk about SSL certificates.
Notes
proxy handler
static content handler (classpath resources)
cache content handler
selenium driver handler

Chapter 4 – Selenium Driver
Goals
User should be able to demonstrate and understanding of ….
• How selenium converts iedoc.xml XML to Java/ruby/python driver
interface and implementation with iedocXXX.xml xslt & Converting
selenese test case to Java test case with XLateHTML2Java and handling
special conditions while test case conversion
• How to run test cases from Java driver end.
• Selenium Driver <—> Selenium Server interactions
Outline
• From the XML doc generated in Chapter one, we will talk about how
code is generated out of it.
• In case of Java binding , how they are creating Java test case from
selenese test case.
• What if we dont want them to generate the system automatically?
• getEval (“WaitUntilPresent”)
• how to get rid of getEval and extending the Selenium driver
( inheritance OR composition )
• patterns (do, get , is )

Chapter 5 – Selenium Driver
Goals
User should be able to demonstrate and understanding of ….
• Understanding hooks
• Understanding how to extend the selenium core objects
• How things would differ from PI and non PI mode
Outline
• Taking the click and the wait ; such that click implicitly calls a
wait

Chapter 6 – Selenium Modes
Goals
User should be able to demonstrate and understanding of ….
• IEHTA/chrome #Running a functional test case under different
browsers
• Page ranking algorithm
• Multi-domain issues
• How to exclude files from injection
Outline
• Talk about IEHTA and Chrome modes
• Demonstrate running the functional tests under different browsers
Facilitated Discussion – “What are the major cross-browser issues have
you faced in general and with Selenium in particular?”

Chapter 7 (part 1) XPath
Goals
User should be able to demonstrate and understanding of ….
• difference between XPath implementation in IE and firefox
• how to change the XPath library used for IE
Outline
• Talk about XPath Implementation in IE and firefox
• Attendees will be asked to find out how to change the XPath library
for IE
• Explain the difference between the two javascript implementations
• Talk about the pros/cons of the native IE XPath implementation
( Including issues with MSXML )
NotesChapter

MSXML cannot deal with malformed HTML documents. That is why a
JavaScript library is needed to deal with XPath.

Chapter 8

This Chapter is more of discussions regarding Selenium issues
• Running selenium test cases in parallel (Selenium Grid)
• Slow JS
• Flex Driver
• Selenium-Flash demo Topics to vary wrt to time. Participation from
audience encouraged
Outline
• Demonstrate the stuff mentioned in the goals and talk in detail

Chapter 9: Wrap Up
Facilitated discussions regarding
• Twist

anything written yet?

(Anonymous)

2009-06-24 10:34 am (UTC)

Is this just a plan, or have you written some of this -I'd be interested in reviewing it

Re: anything written yet?

[info]manish_chaks

2009-06-25 04:57 am (UTC)

I am in the process of writing it. Can you tell me how to reach you?

Looks Good, get writing!

(Anonymous)

2009-06-24 04:44 pm (UTC)

Hiya Manish,

I've been playing with Selenium for about 3 months now and 80% of what you have outlined above feels new to me. Lot's of interesting stuff to learn, now get writing and then send me an evaluation copy :)

Good luck with it!

Twitter: MarkCTest
www.cyreath.co.uk

Re: Looks Good, get writing!

[info]manish_chaks

2009-06-25 04:58 am (UTC)

Hey Mark,
I am working on the book, expect the first draft to be out by end of this month.

( will keep tweeting about the book )

Re: Looks Good, get writing!

(Anonymous)

2009-07-26 05:22 am (UTC)

Hi Manish,

Could you please send out a copy?

Thanks
Shubha

Hi Manish,
when r u going to complete the book.the topics are really good

Thanks,
krishna

automation

(Anonymous)

2009-07-10 01:26 pm (UTC)

Manish,
We can automate web application developed using PHP, Java script, AJAX, flex, MYSQL ?

great topics! this would make a fantastic book. did you ever finish a draft? I would love to review a copy.

-Corey

Need Help - Selenium Grid with Selenese html based test cases

(Anonymous)

2009-11-05 07:21 pm (UTC)

Hi,

I need little help related the following questions:

1. How to use Selenium Grid with Selenese html based test cases
2. How to distribute load for Selenese test cases on different machines using Selenium Grid and Selenium RC

Please help me in these questions. If you have time then please reply to me on this address: asisajjad@gmail.com

Thanks

Sajjad


Home