Since my team has chosen Selenium Core-Firefox chrome with Selenese table test case as primary Selenium testing method, my task will focus on Selenium Core Firefox chrome branch development(A brand new Selenium-IDE). I will also contribute a bundle of Java APIs to play Selenium Core*ffchrome. Moreover, I should provide a GRID framework for huge test case number run.
"Simply the best". No proxy server, no Remote Control, no IE/HTA, no Java Test Case, no Same Origin Policy, I really found this mode is efficient but powerful as long as we provide an enterprise framework.
For QA, they only need learn Selenese table knowledge without Java programming skills. They don't need to install any complex framework but only setup our Selenium-IDE version on their desktop.
For framework developer, then needn't build a heavyweight infrastructure like proxy server, client driver. What they need do are only:
1) Let Selenium-Core*ffchrome save detailed enough result capture/snapshot with well formed structure to local file system.
2) Extend chrome URL parameters to meet all configuration requirements. We can benifit a lot from Mozilla APIs and do some fantasitic jobs for Selenium core(That why we choose Firefox as Selenium browser).
3) A bundle of Java APIs to play Selenium-Core*ffchrome under isolated profile and parse run results to Java Objects. We can define an atomic unit(1-3) as one Selenium Agent.
4) A GRID Java framework to distribute huge test case number run on Agents with scalability. DB support is necessary to save both test case info and run result info.
5) Then a GUI web based test case maintenance and execution portal is possible with above back end framework supporting.
Comparing to official RC+GRID solution, our solution is more suitable for acceptance test, integrating test & regression test(black box).
Showing posts with label Selenese. Show all posts
Showing posts with label Selenese. Show all posts
Saturday, December 20, 2008
Monday, December 15, 2008
Selenese flowControl extensions - advanced support for include template
As my previous post, Selenese flowControl extensions work well on IDE and Core now.
However, when guys used another powerful extension 'include', they found flowControl not work in include template steps.
I provide a quick workaround here. Please revise include extension javascript as below:
I provide a quick workaround here. Please revise include extension javascript as below:
Selenium.prototype.doInclude = function(locator, paramString) { LOG.debug(IncludeCommand.LOG_PREFIX + " Version " + IncludeCommand.VERSION); var includeCommand = new IncludeCommand(); includeCommand.doInclude(locator, paramString); //Jerry Qian: add flowControl support for include template steps try{ htmlTestRunner.currentTest.gotoLabels = {}; htmlTestRunner.currentTest.whileLabels = { ends: {}, whiles: {} }; htmlTestRunner.currentTest.initialiseLabels(); }catch(e){} //End flowControl };Include template steps can use flowControl commands now.
Labels:
Selenese,
Selenium,
user-extensions.js
Saturday, December 13, 2008
Selenese flowControl extensions
Usually, we don't need to do conditional logic in Selenese table. Selenium RC programming language is more suitable for complex logic. But sometimes we still want to add some conditional steps in Selenese, like if...else, while.
Fortunately, there are already flow control extensions on openqa's wiki.
http://wiki.openqa.org/display/SEL/flowControl
It can meet most of flow control requirements for Selenese. We still recommend use RC to implement more complicated logic.
Also some people work on both Core and IDE. They found this extensions not work on IDE. It's a CORE version.
One guy contributed an IDE version: http://51elliot.blogspot.com/2008/02/selenium-ide-goto.html. IDE user can also use it.
So I combined them to a unified flowControl extensions: support both IDE and CORE.
The simplest code:
Fortunately, there are already flow control extensions on openqa's wiki.
http://wiki.openqa.org/display/SEL/flowControl
It can meet most of flow control requirements for Selenese. We still recommend use RC to implement more complicated logic.
Also some people work on both Core and IDE. They found this extensions not work on IDE. It's a CORE version.
One guy contributed an IDE version: http://51elliot.blogspot.com/2008/02/selenium-ide-goto.html. IDE user can also use it.
So I combined them to a unified flowControl extensions: support both IDE and CORE.
The simplest code:
var sel_locstr = window.location.href; if(sel_locstr.indexOf("selenium-ide.xul") != -1){ //IDE mode // paste IDE extension here }else{//Core mode // paste Core extension here }Enjoy!
Labels:
Selenese,
Selenium,
user-extensions.js
Friday, November 7, 2008
Build a regression automation testing framework based on Selenium FIT mode
When company only has 100 regression test cases written by Selenese, QA steps to do regression tasks by Selenium FIT mode:
1) Organize test cases files with suites files on local driver or shared driver
2) Open Chrome TestRunner in Firefox
3) Import test suites address in file sytem, click run
4) Monitor and wait for run finished, manually collect run result and write a run report with generic result info.
Assume your company business's growth and you have 1000+ regression test cases.
How to execute these cases in a short time and generate report with detailed enough info automatically?
0) All QA upload and maintain test cases on a central portal.
1) Choose test cases you want to kick off regression from case repository
2) Specify necessary parameter for regression and kick off
3) A scalable machine matrix in backend begin to do automation run parallelly. There are also multiple instances running simuteniously on same machine. Each instance used Selenium FIT engine. The run snapshot/result/log are stored into filesytem/DB runtimely by above instances called Agent.
4) When all run finished, a report can be generated from file sytem/DB.
It's feasible to implement such a system with Selenium FIT mode.
Comparing to similar system based on S-RC+S-GRID:
1) No need proxy server, more lightweight framework. No need precompile like .java test case source.
2) Firefox Chrome TestRunner is more stable and faster than RC Runner. It can bypass many issues which RC can't resolve. Chrome XPCOM APIs is very powerful for develop Selenium new features.
3) User only need to know how to create a Selenese test case, no other skill requirement.
1) Organize test cases files with suites files on local driver or shared driver
2) Open Chrome TestRunner in Firefox
3) Import test suites address in file sytem, click run
4) Monitor and wait for run finished, manually collect run result and write a run report with generic result info.
Assume your company business's growth and you have 1000+ regression test cases.
How to execute these cases in a short time and generate report with detailed enough info automatically?
0) All QA upload and maintain test cases on a central portal.
1) Choose test cases you want to kick off regression from case repository
2) Specify necessary parameter for regression and kick off
3) A scalable machine matrix in backend begin to do automation run parallelly. There are also multiple instances running simuteniously on same machine. Each instance used Selenium FIT engine. The run snapshot/result/log are stored into filesytem/DB runtimely by above instances called Agent.
4) When all run finished, a report can be generated from file sytem/DB.
It's feasible to implement such a system with Selenium FIT mode.
Comparing to similar system based on S-RC+S-GRID:
1) No need proxy server, more lightweight framework. No need precompile like .java test case source.
2) Firefox Chrome TestRunner is more stable and faster than RC Runner. It can bypass many issues which RC can't resolve. Chrome XPCOM APIs is very powerful for develop Selenium new features.
3) User only need to know how to create a Selenese test case, no other skill requirement.
Labels:
FIT mode,
Sel-FF-Chrome-TestRuner,
Selenese,
Selenium,
XPCOM
Monday, November 3, 2008
Selenium FIT mode vs. Driven mode
Selenium has two usage modes:
1)FIT mode: table style simple script which usually run on Selenium CORE/IDE in standalone IE/FF. We also call it as 'Selenese'. It's simple and easy to install/use for QA with no programming skills.
This is more for "black box" testing and is "asynchronous" in design.
You send the whole test script over to the browser in a "REST" fashion, it generally only has the same access to click and type and change things as a regular user would.
2)Driven mode: a language specific driver for Selenium. It used a proxy server to bypass Same Origin Policy for Selenium. Selenium RC is the product for this mode.
This enables "white box" testing and also "synchronous" in design.
With white box testing, you can send one command to the browser in an "RPC" fashion, get a result, then check the back-end database to confirm like Unit Test. You can benifit from programming lauguage like Java for Selenium.
Read Jason Huggins' topic: Choosing between "Driven Mode" and "FIT or Table style"
1)FIT mode: table style simple script which usually run on Selenium CORE/IDE in standalone IE/FF. We also call it as 'Selenese'. It's simple and easy to install/use for QA with no programming skills.
This is more for "black box" testing and is "asynchronous" in design.
You send the whole test script over to the browser in a "REST" fashion, it generally only has the same access to click and type and change things as a regular user would.
2)Driven mode: a language specific driver for Selenium. It used a proxy server to bypass Same Origin Policy for Selenium. Selenium RC is the product for this mode.
This enables "white box" testing and also "synchronous" in design.
With white box testing, you can send one command to the browser in an "RPC" fashion, get a result, then check the back-end database to confirm like Unit Test. You can benifit from programming lauguage like Java for Selenium.
Read Jason Huggins' topic: Choosing between "Driven Mode" and "FIT or Table style"
Labels:
Driven mode,
FIT mode,
Selenese,
Selenium,
Selenium-IDE,
Selenium-RC
Subscribe to:
Posts (Atom)