© 2012 LogiGear Corporation. All Rights Reserved FitNesseFitNesse Authors: Nghia Pham 1.

Slides:



Advertisements
Similar presentations
FitNesse in Fifty Minutes Chris Harbert Resonate 1.
Advertisements

Microsoft Excel 2003 Illustrated Complete Excel Files and Incorporating Web Information Sharing.
Automating with Open Source Testing Tools Corey McGarrahan rSmart 01-July-08.
What is MySQL? MySQL is a relational database management system (A relational database stores data in separate tables rather than putting all the data.
ORACLE Lecture 1: Oracle 11g Introduction & Installation.
Bhatia, Manoj Chen, Yin Yin Clark, Neo Ghabraei, Ali Tang, John Tran, Wilson Romero, Jessica.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Selenium – Testing Tool. What is Selenium? Selenium is a robust set of tools that supports rapid development of test automation for web-based applications.
TUTORIAL (1) Software installation Written by: Eng. Ahmed Mohamed Abdel Ghafar, Edited by Eng. Muhammed Hammad, Eng. Hamdy Soltan & Eng. Osama Talaat.
With Alex Conger – President of Webmajik.com FrontPage 2002 Level I (Intro & Training) FrontPage 2002 Level I (Intro & Training)
Databases Dan Otero Alex Loddengaard
Selenium Web Test Tool Training Using Ruby Language Discover the automating power of Selenium Kavin School Kavin School Presents: Presented by: Kangeyan.
® IBM Software Group © 2006 IBM Corporation How to read/write XML using EGL This Learning Module shows how to utilize an EGL Library to read/write an XML.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
© 2012 Boise State University1 WordPress Training February 14, 2013.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
Table-Driven Acceptance Testing Mario Aquino Principal Software Engineer Object Computing, Inc.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
INTERNET APPLICATION DEVELOPMENT For More visit:
Eclipse Overview Introduction to Web Programming Kirkwood Continuing Education Fred McClurg © Copyright 2015, Fred McClurg, All Rights Reserved.
Web Technologies Website Development Trade & Industrial Education
Robot Framework – Basic Level. Date: Version:1.0 Page 1.
© 2012 Boise State University1 WordPress Training February 14, 2013.
© 2012 LogiGear Corporation. All Rights Reserved Robot framework.
1 MySQL and phpMyAdmin. 2 Navigate to and log on (username: pmadmin)
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
For Version 6.0 and later Lattice3D Reporter Tutorial For Version 6.0 and later LATTICE TECHNOLOGY, INC.
Website Development with Dreamweaver
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting Installation and Testing.
Java Portals and Portlets Submitted By: Rashi Chopra CIS 764 Fall 2007 Rashi Chopra.
Web Automation Testing With Selenium By Rajesh Kanade.
JDBC Tutorial CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
Acceptance testing An introduction Alessandro Marchetto Fondazione Bruno Kessler - IRST.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
John Lockhart, WebTest Limited STANZ Wellington August 2010 Practical demonstration of FitNesse, FitLibrary and FitLibraryWeb.
Surya Bahadur Kathayat Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example.
® IBM Software Group © 2006 IBM Corporation JSF Rich Text Area Component This Learning Module describes the use of the JSF Rich Text Area component – for.
Introducing Dreamweaver. Dreamweaver The web development application used to create web pages Part of the Adobe creative suite.
® IBM Software Group © 2006 IBM Corporation Rational Asset Manager v7.2 Using Scripting Tutorial for using command line and scripting using Ant Tasks Carlos.
PHP Form Processing * referenced from
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Test Automation Using Selenium Presented by: Shambo Ghosh Ankit Sachan Samapti Sinhamahapatra Akshay Kotawala.
CHAPTER 7 LESSON C Creating Database Reports. Lesson C Objectives  Display image data in a report  Manually create queries and data links  Create summary.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Robot Framework – Basic Level. Date: Version:1.0 Page 1.
How to install JavaCV in Eclipse. Make sure to download and install all these before you proceed Eclipse for Java EE developers (current is Juno)
By Durga Dasari. DbFit - DB Unit and Integration test tool  Test-driven database development. Write readable, easy- to-maintain unit and integration.
Software-Projekt 2008 Seminarvortrag“Short tutorial of MySql“ Wei Chen Verena Honsel.
E Copyright © 2006, Oracle. All rights reserved. Using SQL Developer.
Joomla Awdhesh Kumar Singsys Pte Ltd. What is Joomla? Joomla is an award-winning content management system (CMS), which enables you to build Web sites.
16 Copyright © 2004, Oracle. All rights reserved. Testing the Migrated Oracle Database.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
Data Visualization with Tableau
Fundamental of Databases
Pre-Production Meet with the client to create a project plan:
5.2 Microsoft Excel.
Working in the Forms Developer Environment
Data Virtualization Demoette… ADO.NET Client
Fondazione Bruno Kessler - IRST
CCA Skill Certification
5.2 Microsoft Excel.
Title: Tech Training Certificate: Ace of Initiative Program
Using JDeveloper.
Consult America Technology Consulting Services
Teaching slides Chapter 6.
Review of Previous Lesson
David Cleverly – Development Lead
Presentation transcript:

© 2012 LogiGear Corporation. All Rights Reserved FitNesseFitNesse Authors: Nghia Pham 1

© 2012 LogiGear Corporation. All Rights Reserved Agenda  FitNesse  Fit and Slim  How to write Test Cases  Connect DataBase with Fit  SSH with Slim 2

© 2012 LogiGear Corporation. All Rights Reserved FitNesse – A brief intro 3

© 2012 LogiGear Corporation. All Rights Reserved FitNesse – A brief intro What is FitNesse?  A web server  A wiki  A tool for enhancing collaboration in software development  A software testing tool Define Acceptance Tests (simple tables(input, output)) It supports Java (native),.Net, C++ … It provides a simple way to run tests (tables) and suits 4

© 2012 LogiGear Corporation. All Rights Reserved FitNesse – A brief intro  Fitnesse is not  An automation tool with interface capturing ability  An automation tool with web browser driving ability  But there’re such tools that work with Fitnesse 5

© 2012 LogiGear Corporation. All Rights Reserved FitNesse – A brief intro Table-based approach for acceptance testing 6 Starting from a user story, the customer enters in a table (spreadsheet) the expectations of the program’s behavior. At this point tables can be used as oracle. The customer can manually insert inputs in the System and compare outputs with expected results.

© 2012 LogiGear Corporation. All Rights Reserved Fit and Slim Fit 7 Slim

© 2012 LogiGear Corporation. All Rights Reserved Fit and Slim Fit (Framework for Integrated Test) and Slim (Simple List Invocation Method) are two different ways (test engines) to do automation testing with FitNesse 8

© 2012 LogiGear Corporation. All Rights Reserved Fit and Slim Fit  Born with Fitnesse Slim  Developed later as an alternative to Fit 9  Developers write “fixtures” to link the test cases with the actual system itself  Developers write “fixtures” to link the test cases with the Slim Executor  Fit compares these test cases with actual values returned by the system, and highlights the results with colors and annotations  All the HTML processing, comparisons, and colorizing are run on Fitnesse server

© 2012 LogiGear Corporation. All Rights Reserved Fit and Slim Fit  Fixture code is run on the system under test (SUT), so it depends on the system Slim  All the features are on the FitNesse server, so test tables remain consistent regardless of the platform of the SUT 10  Lots of differences between implementations in Java,.NET, Python  No need to import fixture class, common syntax, common fixture types  Fit has not been developed for a while  Slim is in active development

© 2012 LogiGear Corporation. All Rights Reserved How to…  How to… 11

© 2012 LogiGear Corporation. All Rights Reserved How to install Fitnesse Software requirement:  Oracle JDK for your platform from a/javase/downloads/index.html a/javase/downloads/index.html  Eclipse for Java EE from  Latest fitnesse.jar from sseDevelopment.DownLoad sseDevelopment.DownLoad 12

© 2012 LogiGear Corporation. All Rights Reserved How to run Fitnesse  Create a “StartFitnesse.bat” in the same folder with “fitnesse.jar”  Create its content using the syntax: java -jar [path]\fitnesse.jar -p port_number Ex: java -jar d:\fitnesse.jar -p 9999  Double click the bat file to start Fitnesse server  Open a web browser and navigate to 13

© 2012 LogiGear Corporation. All Rights Reserved How to create a page  Every Fitnesse page must has a name in Camel-Case format. Ex: TestPage, OneMorePage, LastOneHere  Create a root page (no parent):  Put the page name in an existing page where you want to create a link to it, prefix the name with a dot “.”  Click the [?] next to the page name to create content for the page. The page name above will become a link  Create a child page:  Click [add child] link next to the parent page title and enter the child page name  Create a link for the page or it will become a lost page 14

© 2012 LogiGear Corporation. All Rights Reserved How to create a table Create a table in Fitnesse  The first cell contains the table name  Design the table in a spreadsheet  Open Edit mode of a page  Copy and paste the table here  Click “Spreadsheet to Fitnesse” button  Save changes 15

© 2012 LogiGear Corporation. All Rights Reserved How to create a Slim fixture Create Slim fixture for Decision table  Open Eclipse, create a new Java project  Add a new package, give it any name you like  Add a new class in the package. Its name must be the same as the table you want to link to  Add methods for input and output columns Output method has the same name as its column. It returns the expected result. Input method has prefix “set” before its column name. It takes in the value of the column.  Set path to the “bin” folder of the project in the test page and import the package above 16

© 2012 LogiGear Corporation. All Rights Reserved How to create a Slim fixture 17

© 2012 LogiGear Corporation. All Rights Reserved How to use external library  To use an external library  Add the library to the Java project (fixture code). Import its classes and use however you like  Set the path to the external library in the test pages that require this library  It’s as simple as that  Demo Keyword-driven test with Selenium Web-Driver library 18

© 2012 LogiGear Corporation. All Rights Reserved Connect Database with Fit  To use an external library  Step 1: Create DataBase in FitFitNesseDemo page  Step 2: Edit content in DataBase page >MySql >SetUp >SuiteSetUp >TearDown >InterFaces 19

© 2012 LogiGear Corporation. All Rights Reserved Connect Database with Fit  To use an external library  Step 4: Create a new page in Interfaces  Step 5: Declare some variables in DatabaseVariables !define host {localhost} !define schema {automation} !define user {root} !define pass {root} 20

© 2012 LogiGear Corporation. All Rights Reserved Connect Database with Fit  To use an external library  Step 6: Create a new page “ConnectionDataBase” in MySql  Step 7: Change properties in ConnectionDataBase page from Default to Test type 21

© 2012 LogiGear Corporation. All Rights Reserved Connect Database with Fit  Step 8: Edit ConnectDataBase !*****> Import Interfaces in the SimpleSelect !include.FitFitNesseDemo.AdminPortal.InterFaces.GlobalVariables !include.FitFitNesseDemo.AdminPortal.InterFaces.LogInPage !include.FitFitNesseDemo.DataBase.InterFaces.DatabaseVariables *****! !*****> Define to call multiple fixtures: |''add''|!-dbfit.MySqlTest-!|''as''|database| |''add''|!-fitlibrary.spider.SpiderFixture!|''as''|spider| *****! !*****> Connect to database !|Connect|${host}|${user}|${pass}|${schema}| *****! 22

© 2012 LogiGear Corporation. All Rights Reserved Connect Database with Fit  Step 8: Edit ConnectDataBase !*****> Query to get username and password in database |''select''|database| !3 Simple Select |query| SELECT username FROM user WHERE role='${roleName}'| |username?| |>>account| |query| SELECT password from person where id =(SELECT person_id FROM `user` WHERE role='${roleName}')| |password?| |>>password| *****! !*****> Set username and password |set|username|get symbol named|account| |set|password|get symbol named|password| *****! 23

© 2012 LogiGear Corporation. All Rights Reserved Connect Database with Fit  Step 8: Edit ConnectDataBase !*****> Query to get username and password in database |''select''|database| !3 Simple Select |query| SELECT username FROM user WHERE role='${roleName}'| |username?| |>>account| |query| SELECT password from person where id =(SELECT person_id FROM `user` WHERE role='${roleName}')| |password?| |>>password| *****! !*****> Set username and password |set|username|get symbol named|account| |set|password|get symbol named|password| *****! 24

© 2012 LogiGear Corporation. All Rights Reserved SSH with Slim  To use an external library  Step 1: Add “jsch.jar” and “remote- api.jar” library to our lib folder.  Step 2: Create SlimFitNesseDemo page 25

© 2012 LogiGear Corporation. All Rights Reserved SSH with Slim  Step 3: Config in SlimFitNesseDemo page >Ssh !path lib/*.jar !define TEST_SYSTEM {slim} !define COLLAPSE_SETUP {true} !define COLLAPSE_TEARDOWN {true}  Step 4: Create SlimFitNesseDemo page 26

© 2012 LogiGear Corporation. All Rights Reserved SSH with Slim  Step 3: Config in SlimFitNesseDemo page |import| |com.cisco.tcbu.automation.ssh| !*****> Execute a command by ssh |Script|Ssh On Fitnesse| | |check|connect|root |true| |check|exec|ls -la|0| |check|exec|cd folder|1| |check|exec|ls -a --color=never|0| |$check=|exec|tail -30../var/log/messages.log| |check|disconnect|false| **********! 27

© 2012 LogiGear Corporation. All Rights Reserved SSH with Slim  Step 4: Run the test case 28

© 2012 LogiGear Corporation. All Rights Reserved 29

© 2012 LogiGear Corporation. All Rights Reserved THANK YOU 30