Monday 30 June 2014

HTMLUnit Driver Notes

HtmlUnit is a headless web browser written in Java. It allows high-level manipulation of websites from other Java code, including filling and submitting forms and clicking hyperlinks 
This is currently the fastest and most lightweight implementation of WebDriver. As the name suggests, this is based on HtmlUnit

If the purpose of the tests were to validate cross browser/ cross platform behavior, then this may not be the best tool for you. Even though HtmlUnit can simulate FireFox and Internet Explorer, I do not use it for my cross browser test cases i.e. test cases that I run on say IE, FF, Safari etc.

 One other aspect of HtmlUnit to keep in mind is that the ¬®browser¬® is in memory. So, you cannot see what htmlunit is working on (unless you view the page content through say a debugger). This makes htmlunit faster for static pages.

 

Pros

  • Fastest implementation of WebDriver
  • A pure Java solution and so it is platform independent.
  • Supports Javascript

Cons

  • Emulates other browser's JS behaviour (see below)

Javascript in the HtmlUnitDriver

None of the popular browsers uses the javascript engine used by HtmlUnit (Rhino). If you test javascript using HtmlUnit the results may differ significantly from those browsers. 

 ---------------------------------------------------------------------------------------------------------------------------------------------------------
Enabling Javascript

 
HtmlUnitDriver driver = new HtmlUnitDriver();
driver.setJavascriptEnabled(true);


-------------------------------------------------------------------------------------------------------------------------------------------------------

Emulating a Specific Browser

HtmlUnitDriver driver = new HtmlUnitDriver(BrowserVersion.FIREFOX_3);
 
---------------------------------------------------------------------------
 
HTMLUnit acts a 'headless' browser - a browser without a renderer - which lets 
you test the functionality of a website without necessarily testing the 
visual aspects. 




 ------------------------------------------------------------------------------------------------------------------------------------------------------





Thursday 26 June 2014

Jelly Script

1. Create the subdir $JENKINS_HOME/email-templates
------------------------------


2. In that subdir create a file called test.jelly. (some content inside)
------------------------------
 
3. In the JOB, add the following line in the email's DEFAULT_CONTENT to parse/use the jelly file:

${JELLY_SCRIPT,template="test"}

 

Sunday 22 June 2014

Agile Retrospective



As summary ;


  • time of reflection
  • what went well and what did not  go well
  • what could be improved

 3 simple question :
  • What did we do well?
  • What did we do wrong?
  • What could be improved

 
 

Tuesday 10 June 2014

LCSAJ Testing




LCSAJ testing requires a model of the source code which identifies control flow jumps (where control flow does not pass to a sequential statement). 
An LCSAJ (Linear Code Sequence and Jump) is defined by a triple, conventionally identified by line numbers in a source code listing: the start of the linear code sequence, the end of the linear code sequence, and the target line to which control flow is transferred.

Monday 9 June 2014

Selenium - Executing javascript













JavascriptExecuter js = (JavascriptExecuter)driver; //casting driver instance
 
 



Sunday 8 June 2014

WBS - Work Breakdown Structure

A work breakdown structure (WBS), in project management and systems engineering, is a deliverable-oriented decomposition of a project into smaller components.






To be able to actually execute the project, the project scope is broken down into manageable tasks by creating a work breakdown structure (WBS). In other words, a WBS is a deliverable-oriented hierarchy of the work that must be performed to accomplish the objectives of and create the deliverables for the project.

Decomposition is a technique used for subdividing the project deliverables into smaller, manageable tasks called work packages. The WBS is a hierarchical structure with work packages at the lowest level of each branch.



ISTQB - Notes I

Common type of V-Model use 4 test levels
1- Component Test
2- Integration Test
3- System Test
4- Acceptance Test

V-Model can have different level of testing activity depends on project


--------------------------------------------------------

Typical tester tasks may include:
- Review and contribute to test plans.
- Analyze, review and assess user requirements, specifications and models for testability.
- Create test specifications.
- Set up the test environment (often coordinating with system administration and network
management).
- Prepare and acquire test data.
- Implement tests on all test levels, execute and log the tests, evaluate the results and
document the deviations from expected results.
- Use test administration or management tools and test monitoring tools as required.
- Automate tests (may be supported by a developer or a test automation expert).
- Measure performance of components and systems (if applicable).
- Review tests developed by others.

-------------------------------------------------------

Test approaches
- Preventative approaches, where tests are designed as early as possible.
- Reactive approaches, where test design comes after the software or system has been
produced.
-----------------------------------------------------------

State transition testing: A black box test design technique in which test cases are designed to
execute valid and invalid state transitions

---------------------------------------------------------------------------
Static testing: Testing of a component or system at specification or implementation level
without execution of that software, e.g. reviews or static code analysis.

--------------------------------------------------------------------------------------
Top-down testing: An incremental approach to integration testing

The process is repeated until the lowest level components have been tested

-----------------------------------------------------------------------------------