SlideShare une entreprise Scribd logo
1  sur  21
JsUnit www.jsunit.net An introduction to unit testing in-browser JavaScript with JsUnit Edward Hieatt [email_address] February, 2005 JsUnit version 2.1 Note: this presentation assumes the reader/audience is familiar with basic unit testing concepts
JsUnit: Part 1 Writing and manually running JavaScript Tests with the XUnit framework for in-browser JavaScript
What is an XUnit framework? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JsUnit: background ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JsUnit: conforming to XUnit ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JUnit <-> JsUnit ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Test Page Example 1: Testing some simple math (code in Test Page) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Test Page example 2: Testing form field/DOM interaction (code in .js file) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JsUnit: the TestRunner
JsUnit Tracing (debugging output) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Supported Browsers/OSs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JsUnit: the most FA’d Q ,[object Object],[object Object],[object Object],[object Object],[object Object]
JsUnit: Part 2 The automation of runs of JsUnit Test Pages/Suites on multiple local or remote browsers/OSs from an Ant script or JUnit suite (and hence in a continuous build)
The goals of automated test runs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Automation on a single machine: StandaloneTest ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
StandaloneTest: how it works ,[object Object],[object Object],[object Object],[object Object],[object Object]
Automation on multiple machines: DistributedTest ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
DistributedTest: how it works ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Running in a continuous build ,[object Object],[object Object],[object Object]
StandaloneTest: Logging ,[object Object],[object Object],[object Object]
Sample Log File

Contenu connexe

Tendances

Testing Options in Java
Testing Options in JavaTesting Options in Java
Testing Options in JavaMichael Fons
 
Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxuirit2010
 
JUnit- A Unit Testing Framework
JUnit- A Unit Testing FrameworkJUnit- A Unit Testing Framework
JUnit- A Unit Testing FrameworkOnkar Deshpande
 
Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013Hazem Saleh
 
Guide to the jungle of testing frameworks
Guide to the jungle of testing frameworksGuide to the jungle of testing frameworks
Guide to the jungle of testing frameworksTomáš Kypta
 
Introduction To UnitTesting & JUnit
Introduction To UnitTesting & JUnitIntroduction To UnitTesting & JUnit
Introduction To UnitTesting & JUnitMindfire Solutions
 
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...Thomas Weller
 
Unit Testing Android Applications
Unit Testing Android ApplicationsUnit Testing Android Applications
Unit Testing Android ApplicationsRody Middelkoop
 
Introduction to Box2D Physics Engine
Introduction to Box2D Physics EngineIntroduction to Box2D Physics Engine
Introduction to Box2D Physics Enginefirstthumb
 
Mockito vs JMockit, battle of the mocking frameworks
Mockito vs JMockit, battle of the mocking frameworksMockito vs JMockit, battle of the mocking frameworks
Mockito vs JMockit, battle of the mocking frameworksEndranNL
 
TestNG introduction
TestNG introductionTestNG introduction
TestNG introductionDenis Bazhin
 

Tendances (20)

Junit and testNG
Junit and testNGJunit and testNG
Junit and testNG
 
Testing Options in Java
Testing Options in JavaTesting Options in Java
Testing Options in Java
 
Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxui
 
JUnit- A Unit Testing Framework
JUnit- A Unit Testing FrameworkJUnit- A Unit Testing Framework
JUnit- A Unit Testing Framework
 
Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013
 
Guide to the jungle of testing frameworks
Guide to the jungle of testing frameworksGuide to the jungle of testing frameworks
Guide to the jungle of testing frameworks
 
Unit Testing in Java
Unit Testing in JavaUnit Testing in Java
Unit Testing in Java
 
French kit2019
French kit2019French kit2019
French kit2019
 
Unit testing basic
Unit testing basicUnit testing basic
Unit testing basic
 
Introduction To UnitTesting & JUnit
Introduction To UnitTesting & JUnitIntroduction To UnitTesting & JUnit
Introduction To UnitTesting & JUnit
 
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
 
Unit Testing Android Applications
Unit Testing Android ApplicationsUnit Testing Android Applications
Unit Testing Android Applications
 
Junit
JunitJunit
Junit
 
JMockit
JMockitJMockit
JMockit
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Test ng
Test ngTest ng
Test ng
 
Introduction to Box2D Physics Engine
Introduction to Box2D Physics EngineIntroduction to Box2D Physics Engine
Introduction to Box2D Physics Engine
 
Mockito vs JMockit, battle of the mocking frameworks
Mockito vs JMockit, battle of the mocking frameworksMockito vs JMockit, battle of the mocking frameworks
Mockito vs JMockit, battle of the mocking frameworks
 
Unit testing with java
Unit testing with javaUnit testing with java
Unit testing with java
 
TestNG introduction
TestNG introductionTestNG introduction
TestNG introduction
 

Similaire à Jsunit

J unit presentation
J unit presentationJ unit presentation
J unit presentationPriya Sharma
 
SwtBot: Unit Testing Made Easy
SwtBot: Unit Testing Made EasySwtBot: Unit Testing Made Easy
SwtBot: Unit Testing Made EasyAnkit Goel
 
Automation testing by Durgasoft in Hyderabad
Automation testing by Durgasoft in HyderabadAutomation testing by Durgasoft in Hyderabad
Automation testing by Durgasoft in HyderabadDurga Prasad
 
Automation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabadAutomation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabadDurga Prasad
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2Tricode (part of Dept)
 
Qtp 9.2 examples
Qtp 9.2 examplesQtp 9.2 examples
Qtp 9.2 examplesmedsherb
 
Junit and cactus
Junit and cactusJunit and cactus
Junit and cactusHimanshu
 
Jack borden jb471909_junit1
Jack borden jb471909_junit1Jack borden jb471909_junit1
Jack borden jb471909_junit1jborden33
 
Jack borden jb471909_junit
Jack borden jb471909_junitJack borden jb471909_junit
Jack borden jb471909_junitjborden33
 
Puppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing ToolPuppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing ToolMiki Lombardi
 
What is JUnit? | Edureka
What is JUnit? | EdurekaWhat is JUnit? | Edureka
What is JUnit? | EdurekaEdureka!
 
Testing And Drupal
Testing And DrupalTesting And Drupal
Testing And DrupalPeter Arato
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosFlutter Agency
 

Similaire à Jsunit (20)

J unit presentation
J unit presentationJ unit presentation
J unit presentation
 
JUnit Presentation
JUnit PresentationJUnit Presentation
JUnit Presentation
 
Junit
JunitJunit
Junit
 
SwtBot: Unit Testing Made Easy
SwtBot: Unit Testing Made EasySwtBot: Unit Testing Made Easy
SwtBot: Unit Testing Made Easy
 
Automation testing by Durgasoft in Hyderabad
Automation testing by Durgasoft in HyderabadAutomation testing by Durgasoft in Hyderabad
Automation testing by Durgasoft in Hyderabad
 
Automation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabadAutomation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabad
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2
 
Testing Tools
Testing ToolsTesting Tools
Testing Tools
 
Qtp 9.2 examples
Qtp 9.2 examplesQtp 9.2 examples
Qtp 9.2 examples
 
Junit and cactus
Junit and cactusJunit and cactus
Junit and cactus
 
What is selenium
What is seleniumWhat is selenium
What is selenium
 
Jack borden jb471909_junit1
Jack borden jb471909_junit1Jack borden jb471909_junit1
Jack borden jb471909_junit1
 
Jack borden jb471909_junit
Jack borden jb471909_junitJack borden jb471909_junit
Jack borden jb471909_junit
 
Puppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing ToolPuppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing Tool
 
What is JUnit? | Edureka
What is JUnit? | EdurekaWhat is JUnit? | Edureka
What is JUnit? | Edureka
 
8-testing.pptx
8-testing.pptx8-testing.pptx
8-testing.pptx
 
Unit testing with JUnit
Unit testing with JUnitUnit testing with JUnit
Unit testing with JUnit
 
Testing And Drupal
Testing And DrupalTesting And Drupal
Testing And Drupal
 
N Unit Presentation
N Unit PresentationN Unit Presentation
N Unit Presentation
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
 

Jsunit

  • 1. JsUnit www.jsunit.net An introduction to unit testing in-browser JavaScript with JsUnit Edward Hieatt [email_address] February, 2005 JsUnit version 2.1 Note: this presentation assumes the reader/audience is familiar with basic unit testing concepts
  • 2. JsUnit: Part 1 Writing and manually running JavaScript Tests with the XUnit framework for in-browser JavaScript
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 10.
  • 11.
  • 12.
  • 13. JsUnit: Part 2 The automation of runs of JsUnit Test Pages/Suites on multiple local or remote browsers/OSs from an Ant script or JUnit suite (and hence in a continuous build)
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.