SlideShare a Scribd company logo
Problem Statement / TargetAbility to run JavaScript tests through commandline (not exactly headlessly)Integrate test results with the Bamboo build planVisibility of code-coverage
Options for JS test-runner toolsEnv.js and Rhino.jsV8 JavaScript EngineJasmine-Maven plug-inJasmine-Ruby plug-inJasmine-JsTestDriver
Env.js & Rhino.jsUses its own JS engineIs more closer to Mozilla FirefoxStill does not even behave as a mirror image of Firefox, on commandlineFindings: behaves as a different browser in itselfV8 JavaScript EngineGoogle's open source JavaScript engine, used in chromeIs a C++ code-base, needs to be compiled on local machinePretty capable, supports Mozilla and chrome, not sure about SafariFindings: Pretty capable, but have not explored much
Jasmine-Maven Plug-inUses HTMLUnit for headless browser runnerHTMLUnit’s only supports Firefox and IEFindings – not capable to mock Safari capabilitiesJasmine-Ruby Plug-inHas major issues with the “afterEach” and “toContains” Jasmine capabilitiesCan run with any browser – need to open the SpecRunner.html on the browser of choice !!!Findings – Promising, but needs to evolve
JsTestDriver
Why JsTestDriverCan run JS tests through commandline, on the browser(ant version) of choiceGenerates output in JUnit format, making it easier for Bamboo integrationWell compatible with JasminePossesses code-coverage capabilityHad certain minor issues, which have a workaround now
Workarounds required for JTDNot fully compatible with prototype.js – required jar fixJasmine spy issue, was unable to remove the spies – required Jasmine-JsTestDriver Adapter fixNever closes the browser tab when test-runner completes – added a minor apple-script fix
Testing with JTDjsTestDriver configurationserver: http://localhost:9876load:  - "tools/jasmine-test-driver/jasmine-1.0.1.js"  - "tools/jasmine-test-driver/JasmineAdapter.js"  - "tools/jasmine-test-driver/prototype-1.6.0.3.js"  - "dist/qowt-browser-unitTests.js"rake testjava  -Xms512m -Xmx1024m -jar tools/jasmine-test-driver/JsTestDriver-1.2.2.jar --reset --port 9876 --runnerMode DEBUG --browser open --tests all --testOutput tests/test-reports
Creating test-append-areaQOWT.TEST.UTILS = function() {    return {        /**         * creates dummy Test Append Area, and appends it to the document object, for running tests headlessly         * While executing tests on Sumulat, you get "testAppendArea" div present in the html body itself.         * But, in case of jsTestDriver, you do not have any such div present, and will have to create it on the fly.         * @return testAppendArea div          */createTestAppendArea: function() {vartestAppendAreaContainer = document.getElementById('testAppendArea');            if(testAppendAreaContainer === null) {testAppendAreaContainer = document.createElement("div");testAppendAreaContainer.innerHTML = '<div id="testAppendArea"></div>';document.body.insert(testAppendAreaContainer);            }            return document.getElementById('testAppendArea');        }    };}();USAGE: (CommonContentMrg-test.js)testAppendArea = QOWT.TEST.UTILS.createTestAppendArea();testAppendArea.appendChild(rootNode);
Code-Coverage with JTDrake coveragehttp://quicknet/display/PROD/Generating+Code+Coverage+ReportsCoverage configurationsserver: http://localhost:9876load:  - "../jasmine-1.0.1.js"  - "../JasmineAdapter.js"  - "../prototype-1.6.0.3.js"  - "../../../dist/qowt-browser-doc-sheet.js"  - "../../../dist/qowt-browser-point.js"  - "../../../dist/qowt-browser-testsOnly.js"plugin: - name: "coverage"   jar: "tools/jasmine-test-driver/plugins/coverage-1.2.2.jar"   module: "com.google.jstestdriver.coverage.CoverageModule"
Debugging on JTDStart the server - java -Xms512m -Xmx1024m -jar tools/jasmine-test-driver/JsTestDriver-1.2.2.jar  --port 9876Open the browser with the url- http://localhost:9876/captureRun the tests - java -Xms512m -Xmx1024m -jar tools/jasmine-test-driver/JsTestDriver-1.2.2.jar --tests allApply the breakpointRun the tests again
Known issue with JTDThe rake script fails to close Safari window, if it has the developer console opened !!!
Questions … ?
Ad

More Related Content

What's hot (20)

JavaScript Test-Driven Development with Jasmine 2.0 and Karma
JavaScript Test-Driven Development with Jasmine 2.0 and Karma JavaScript Test-Driven Development with Jasmine 2.0 and Karma
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
Christopher Bartling
 
Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web Applications
Seth McLaughlin
 
Front-End Testing: Demystified
Front-End Testing: DemystifiedFront-End Testing: Demystified
Front-End Testing: Demystified
Seth McLaughlin
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and Karma
Christopher Bartling
 
Nightwatch at Tilt
Nightwatch at TiltNightwatch at Tilt
Nightwatch at Tilt
Dave King
 
AngularJS Unit Test
AngularJS Unit TestAngularJS Unit Test
AngularJS Unit Test
Chiew Carol
 
Quick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmineQuick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmine
Gil Fink
 
클린코드를 위한 테스트 주도 개발 1장
클린코드를 위한 테스트 주도 개발 1장클린코드를 위한 테스트 주도 개발 1장
클린코드를 위한 테스트 주도 개발 1장
Pilhwan Kim
 
Automated Smoke Tests with Protractor
Automated Smoke Tests with ProtractorAutomated Smoke Tests with Protractor
Automated Smoke Tests with Protractor
🌱 Dale Spoonemore
 
An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.
BugRaptors
 
CasperJS and PhantomJS for Automated Testing
CasperJS and PhantomJS for Automated TestingCasperJS and PhantomJS for Automated Testing
CasperJS and PhantomJS for Automated Testing
X-Team
 
Testing frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTesting frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabs
Tudor Barbu
 
Detecting headless browsers
Detecting headless browsersDetecting headless browsers
Detecting headless browsers
Sergey Shekyan
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
政億 林
 
Automated Testing with Ruby
Automated Testing with RubyAutomated Testing with Ruby
Automated Testing with Ruby
Keith Pitty
 
Unit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and KarmaUnit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and Karma
Andrey Kolodnitsky
 
Advanced Jasmine - Front-End JavaScript Unit Testing
Advanced Jasmine - Front-End JavaScript Unit TestingAdvanced Jasmine - Front-End JavaScript Unit Testing
Advanced Jasmine - Front-End JavaScript Unit Testing
Lars Thorup
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma intro
Maurice De Beijer [MVP]
 
AngularJS performance & production tips
AngularJS performance & production tipsAngularJS performance & production tips
AngularJS performance & production tips
Nir Kaufman
 
AngularJS Unit Testing w/Karma and Jasmine
AngularJS Unit Testing w/Karma and JasmineAngularJS Unit Testing w/Karma and Jasmine
AngularJS Unit Testing w/Karma and Jasmine
foxp2code
 
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
JavaScript Test-Driven Development with Jasmine 2.0 and Karma JavaScript Test-Driven Development with Jasmine 2.0 and Karma
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
Christopher Bartling
 
Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web Applications
Seth McLaughlin
 
Front-End Testing: Demystified
Front-End Testing: DemystifiedFront-End Testing: Demystified
Front-End Testing: Demystified
Seth McLaughlin
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and Karma
Christopher Bartling
 
Nightwatch at Tilt
Nightwatch at TiltNightwatch at Tilt
Nightwatch at Tilt
Dave King
 
AngularJS Unit Test
AngularJS Unit TestAngularJS Unit Test
AngularJS Unit Test
Chiew Carol
 
Quick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmineQuick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmine
Gil Fink
 
클린코드를 위한 테스트 주도 개발 1장
클린코드를 위한 테스트 주도 개발 1장클린코드를 위한 테스트 주도 개발 1장
클린코드를 위한 테스트 주도 개발 1장
Pilhwan Kim
 
Automated Smoke Tests with Protractor
Automated Smoke Tests with ProtractorAutomated Smoke Tests with Protractor
Automated Smoke Tests with Protractor
🌱 Dale Spoonemore
 
An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.
BugRaptors
 
CasperJS and PhantomJS for Automated Testing
CasperJS and PhantomJS for Automated TestingCasperJS and PhantomJS for Automated Testing
CasperJS and PhantomJS for Automated Testing
X-Team
 
Testing frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTesting frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabs
Tudor Barbu
 
Detecting headless browsers
Detecting headless browsersDetecting headless browsers
Detecting headless browsers
Sergey Shekyan
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
政億 林
 
Automated Testing with Ruby
Automated Testing with RubyAutomated Testing with Ruby
Automated Testing with Ruby
Keith Pitty
 
Unit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and KarmaUnit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and Karma
Andrey Kolodnitsky
 
Advanced Jasmine - Front-End JavaScript Unit Testing
Advanced Jasmine - Front-End JavaScript Unit TestingAdvanced Jasmine - Front-End JavaScript Unit Testing
Advanced Jasmine - Front-End JavaScript Unit Testing
Lars Thorup
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma intro
Maurice De Beijer [MVP]
 
AngularJS performance & production tips
AngularJS performance & production tipsAngularJS performance & production tips
AngularJS performance & production tips
Nir Kaufman
 
AngularJS Unit Testing w/Karma and Jasmine
AngularJS Unit Testing w/Karma and JasmineAngularJS Unit Testing w/Karma and Jasmine
AngularJS Unit Testing w/Karma and Jasmine
foxp2code
 

Viewers also liked (12)

การนับเวลาแบบสุริยคติ+547+54his p03 f03-4page
การนับเวลาแบบสุริยคติ+547+54his p03 f03-4pageการนับเวลาแบบสุริยคติ+547+54his p03 f03-4page
การนับเวลาแบบสุริยคติ+547+54his p03 f03-4page
Prachoom Rangkasikorn
 
NSR 1
NSR 1NSR 1
NSR 1
Zachariah Webb
 
איך מעלים תיקיות לאחסון בגוגל דרייב
איך מעלים תיקיות לאחסון בגוגל דרייבאיך מעלים תיקיות לאחסון בגוגל דרייב
איך מעלים תיקיות לאחסון בגוגל דרייב
ziv lapld
 
Diploma
DiplomaDiploma
Diploma
Stephen L
 
1 23 pv-aptw
1 23 pv-aptw1 23 pv-aptw
1 23 pv-aptw
NiekT
 
ביטול הרשאה ממי שלא בעל הקובץ
ביטול הרשאה ממי שלא בעל הקובץביטול הרשאה ממי שלא בעל הקובץ
ביטול הרשאה ממי שלא בעל הקובץ
ziv lapld
 
Reseña gomez palacio 81 106
Reseña gomez palacio 81 106Reseña gomez palacio 81 106
Reseña gomez palacio 81 106
Mar Alicia Sanchez
 
Resumen plan de estudios 2011 pimer grado
Resumen plan de estudios 2011 pimer gradoResumen plan de estudios 2011 pimer grado
Resumen plan de estudios 2011 pimer grado
yisselrobles
 
MBA Without GMAT In Australia?
MBA Without GMAT In Australia?MBA Without GMAT In Australia?
MBA Without GMAT In Australia?
Global Opportunities
 
Acuerdo sobre víctimas
Acuerdo sobre víctimasAcuerdo sobre víctimas
Acuerdo sobre víctimas
teleSUR TV
 
Swift white paper_rmb_internationalisation_en
Swift white paper_rmb_internationalisation_enSwift white paper_rmb_internationalisation_en
Swift white paper_rmb_internationalisation_en
Bassam A. KASSEM
 
การนับเวลาแบบสุริยคติ+547+54his p03 f03-4page
การนับเวลาแบบสุริยคติ+547+54his p03 f03-4pageการนับเวลาแบบสุริยคติ+547+54his p03 f03-4page
การนับเวลาแบบสุริยคติ+547+54his p03 f03-4page
Prachoom Rangkasikorn
 
איך מעלים תיקיות לאחסון בגוגל דרייב
איך מעלים תיקיות לאחסון בגוגל דרייבאיך מעלים תיקיות לאחסון בגוגל דרייב
איך מעלים תיקיות לאחסון בגוגל דרייב
ziv lapld
 
1 23 pv-aptw
1 23 pv-aptw1 23 pv-aptw
1 23 pv-aptw
NiekT
 
ביטול הרשאה ממי שלא בעל הקובץ
ביטול הרשאה ממי שלא בעל הקובץביטול הרשאה ממי שלא בעל הקובץ
ביטול הרשאה ממי שלא בעל הקובץ
ziv lapld
 
Resumen plan de estudios 2011 pimer grado
Resumen plan de estudios 2011 pimer gradoResumen plan de estudios 2011 pimer grado
Resumen plan de estudios 2011 pimer grado
yisselrobles
 
Acuerdo sobre víctimas
Acuerdo sobre víctimasAcuerdo sobre víctimas
Acuerdo sobre víctimas
teleSUR TV
 
Swift white paper_rmb_internationalisation_en
Swift white paper_rmb_internationalisation_enSwift white paper_rmb_internationalisation_en
Swift white paper_rmb_internationalisation_en
Bassam A. KASSEM
 
Ad

Similar to Jasmine with JS-Test-Driver (20)

Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e big
Andy Peterson
 
Test strategy for web development
Test strategy for web developmentTest strategy for web development
Test strategy for web development
alice yang
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
Christian Johansen
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
Ioan Eugen Stan
 
Using of TDD practices for Magento
Using of TDD practices for MagentoUsing of TDD practices for Magento
Using of TDD practices for Magento
Ivan Chepurnyi
 
Gems Of Selenium
Gems Of SeleniumGems Of Selenium
Gems Of Selenium
Skills Matter
 
Automated javascript unit testing
Automated javascript unit testingAutomated javascript unit testing
Automated javascript unit testing
ryan_chambers
 
Protractor framework architecture with example
Protractor framework architecture with exampleProtractor framework architecture with example
Protractor framework architecture with example
shadabgilani
 
Easy tests with Selenide and Easyb
Easy tests with Selenide and EasybEasy tests with Selenide and Easyb
Easy tests with Selenide and Easyb
Iakiv Kramarenko
 
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
Ortus Solutions, Corp
 
Understanding JavaScript Testing
Understanding JavaScript TestingUnderstanding JavaScript Testing
Understanding JavaScript Testing
Kissy Team
 
Thomas Fuchs Presentation
Thomas Fuchs PresentationThomas Fuchs Presentation
Thomas Fuchs Presentation
RubyOnRails_dude
 
Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016
Yves Hoppe
 
Testing your application on Google App Engine
Testing your application on Google App EngineTesting your application on Google App Engine
Testing your application on Google App Engine
Inphina Technologies
 
Testing Your Application On Google App Engine
Testing Your Application On Google App EngineTesting Your Application On Google App Engine
Testing Your Application On Google App Engine
IndicThreads
 
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and MavenWebtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Thorsten Kamann
 
Junit_.pptx
Junit_.pptxJunit_.pptx
Junit_.pptx
Suman Sourav
 
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciollaJavascript tdd byandreapaciolla
Javascript tdd byandreapaciolla
Andrea Paciolla
 
Compatibility Detector Tool of Chrome extensions
Compatibility Detector Tool of Chrome extensionsCompatibility Detector Tool of Chrome extensions
Compatibility Detector Tool of Chrome extensions
Kai Cui
 
A few good JavaScript development tools
A few good JavaScript development toolsA few good JavaScript development tools
A few good JavaScript development tools
Simon Kim
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e big
Andy Peterson
 
Test strategy for web development
Test strategy for web developmentTest strategy for web development
Test strategy for web development
alice yang
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
Ioan Eugen Stan
 
Using of TDD practices for Magento
Using of TDD practices for MagentoUsing of TDD practices for Magento
Using of TDD practices for Magento
Ivan Chepurnyi
 
Automated javascript unit testing
Automated javascript unit testingAutomated javascript unit testing
Automated javascript unit testing
ryan_chambers
 
Protractor framework architecture with example
Protractor framework architecture with exampleProtractor framework architecture with example
Protractor framework architecture with example
shadabgilani
 
Easy tests with Selenide and Easyb
Easy tests with Selenide and EasybEasy tests with Selenide and Easyb
Easy tests with Selenide and Easyb
Iakiv Kramarenko
 
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
Ortus Solutions, Corp
 
Understanding JavaScript Testing
Understanding JavaScript TestingUnderstanding JavaScript Testing
Understanding JavaScript Testing
Kissy Team
 
Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016
Yves Hoppe
 
Testing your application on Google App Engine
Testing your application on Google App EngineTesting your application on Google App Engine
Testing your application on Google App Engine
Inphina Technologies
 
Testing Your Application On Google App Engine
Testing Your Application On Google App EngineTesting Your Application On Google App Engine
Testing Your Application On Google App Engine
IndicThreads
 
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and MavenWebtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Thorsten Kamann
 
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciollaJavascript tdd byandreapaciolla
Javascript tdd byandreapaciolla
Andrea Paciolla
 
Compatibility Detector Tool of Chrome extensions
Compatibility Detector Tool of Chrome extensionsCompatibility Detector Tool of Chrome extensions
Compatibility Detector Tool of Chrome extensions
Kai Cui
 
A few good JavaScript development tools
A few good JavaScript development toolsA few good JavaScript development tools
A few good JavaScript development tools
Simon Kim
 
Ad

Recently uploaded (20)

tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 

Jasmine with JS-Test-Driver

  • 1. Problem Statement / TargetAbility to run JavaScript tests through commandline (not exactly headlessly)Integrate test results with the Bamboo build planVisibility of code-coverage
  • 2. Options for JS test-runner toolsEnv.js and Rhino.jsV8 JavaScript EngineJasmine-Maven plug-inJasmine-Ruby plug-inJasmine-JsTestDriver
  • 3. Env.js & Rhino.jsUses its own JS engineIs more closer to Mozilla FirefoxStill does not even behave as a mirror image of Firefox, on commandlineFindings: behaves as a different browser in itselfV8 JavaScript EngineGoogle's open source JavaScript engine, used in chromeIs a C++ code-base, needs to be compiled on local machinePretty capable, supports Mozilla and chrome, not sure about SafariFindings: Pretty capable, but have not explored much
  • 4. Jasmine-Maven Plug-inUses HTMLUnit for headless browser runnerHTMLUnit’s only supports Firefox and IEFindings – not capable to mock Safari capabilitiesJasmine-Ruby Plug-inHas major issues with the “afterEach” and “toContains” Jasmine capabilitiesCan run with any browser – need to open the SpecRunner.html on the browser of choice !!!Findings – Promising, but needs to evolve
  • 6. Why JsTestDriverCan run JS tests through commandline, on the browser(ant version) of choiceGenerates output in JUnit format, making it easier for Bamboo integrationWell compatible with JasminePossesses code-coverage capabilityHad certain minor issues, which have a workaround now
  • 7. Workarounds required for JTDNot fully compatible with prototype.js – required jar fixJasmine spy issue, was unable to remove the spies – required Jasmine-JsTestDriver Adapter fixNever closes the browser tab when test-runner completes – added a minor apple-script fix
  • 8. Testing with JTDjsTestDriver configurationserver: http://localhost:9876load: - "tools/jasmine-test-driver/jasmine-1.0.1.js" - "tools/jasmine-test-driver/JasmineAdapter.js" - "tools/jasmine-test-driver/prototype-1.6.0.3.js" - "dist/qowt-browser-unitTests.js"rake testjava -Xms512m -Xmx1024m -jar tools/jasmine-test-driver/JsTestDriver-1.2.2.jar --reset --port 9876 --runnerMode DEBUG --browser open --tests all --testOutput tests/test-reports
  • 9. Creating test-append-areaQOWT.TEST.UTILS = function() { return { /** * creates dummy Test Append Area, and appends it to the document object, for running tests headlessly * While executing tests on Sumulat, you get "testAppendArea" div present in the html body itself. * But, in case of jsTestDriver, you do not have any such div present, and will have to create it on the fly. * @return testAppendArea div */createTestAppendArea: function() {vartestAppendAreaContainer = document.getElementById('testAppendArea'); if(testAppendAreaContainer === null) {testAppendAreaContainer = document.createElement("div");testAppendAreaContainer.innerHTML = '<div id="testAppendArea"></div>';document.body.insert(testAppendAreaContainer); } return document.getElementById('testAppendArea'); } };}();USAGE: (CommonContentMrg-test.js)testAppendArea = QOWT.TEST.UTILS.createTestAppendArea();testAppendArea.appendChild(rootNode);
  • 10. Code-Coverage with JTDrake coveragehttp://quicknet/display/PROD/Generating+Code+Coverage+ReportsCoverage configurationsserver: http://localhost:9876load: - "../jasmine-1.0.1.js" - "../JasmineAdapter.js" - "../prototype-1.6.0.3.js" - "../../../dist/qowt-browser-doc-sheet.js" - "../../../dist/qowt-browser-point.js" - "../../../dist/qowt-browser-testsOnly.js"plugin: - name: "coverage" jar: "tools/jasmine-test-driver/plugins/coverage-1.2.2.jar" module: "com.google.jstestdriver.coverage.CoverageModule"
  • 11. Debugging on JTDStart the server - java -Xms512m -Xmx1024m -jar tools/jasmine-test-driver/JsTestDriver-1.2.2.jar --port 9876Open the browser with the url- http://localhost:9876/captureRun the tests - java -Xms512m -Xmx1024m -jar tools/jasmine-test-driver/JsTestDriver-1.2.2.jar --tests allApply the breakpointRun the tests again
  • 12. Known issue with JTDThe rake script fails to close Safari window, if it has the developer console opened !!!