SlideShare uma empresa Scribd logo
1 de 13
Problem Statement / Target Ability to run JavaScript tests through commandline (not exactly headlessly) Integrate test results with the Bamboo build plan Visibility of code-coverage
Options for JS test-runner tools Env.js and Rhino.js V8 JavaScript Engine Jasmine-Maven plug-in Jasmine-Ruby plug-in Jasmine-JsTestDriver
Env.js & Rhino.js Uses its own JS engine Is more closer to Mozilla Firefox Still does not even behave as a mirror image of Firefox, on commandline Findings: behaves as a different browser in itself V8 JavaScript Engine Google's open source JavaScript engine, used in chrome Is a C++ code-base, needs to be compiled on local machine Pretty capable, supports Mozilla and chrome, not sure about Safari Findings: Pretty capable, but have not explored much
Jasmine-Maven Plug-in Uses HTMLUnit for headless browser runner HTMLUnit’s only supports Firefox and IE Findings – not capable to mock Safari capabilities Jasmine-Ruby Plug-in Has major issues with the “afterEach” and “toContains” Jasmine capabilities Can run with any browser – need to open the SpecRunner.html on the browser of choice !!! Findings – Promising, but needs to evolve
JsTestDriver
Why JsTestDriver Can run JS tests through commandline, on the browser(ant version) of choice Generates output in JUnit format, making it easier for Bamboo integration Well compatible with Jasmine Possesses code-coverage capability Had certain minor issues, which have a workaround now
Workarounds required for JTD Not fully compatible with prototype.js – required jar fix Jasmine spy issue, was unable to remove the spies – required Jasmine-JsTestDriver Adapter fix Never closes the browser tab when test-runner completes – added a minor apple-script fix
Testing with JTD jsTestDriver configuration server: http://localhost:9876 load:   - "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 test java  -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-area QOWT.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 JTD rake coverage http://quicknet/display/PROD/Generating+Code+Coverage+Reports Coverage configurations server: http://localhost:9876 load:   - "../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 JTD Start the server - java -Xms512m -Xmx1024m -jar tools/jasmine-test-driver/JsTestDriver-1.2.2.jar  --port 9876 Open the browser with the url- http://localhost:9876/capture Run the tests - java -Xms512m -Xmx1024m -jar tools/jasmine-test-driver/JsTestDriver-1.2.2.jar --tests all Apply the breakpoint Run the tests again
Known issue with JTD The rake script fails to close Safari window, if it has the developer console opened !!!
Questions … ?

Mais conteúdo relacionado

Mais procurados

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 ApplicationsSeth McLaughlin
 
Front-End Testing: Demystified
Front-End Testing: DemystifiedFront-End Testing: Demystified
Front-End Testing: DemystifiedSeth McLaughlin
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaChristopher Bartling
 
Nightwatch at Tilt
Nightwatch at TiltNightwatch at Tilt
Nightwatch at TiltDave King
 
AngularJS Unit Test
AngularJS Unit TestAngularJS Unit Test
AngularJS Unit TestChiew 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 jasmineGil 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 TestingX-Team
 
Testing frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTesting frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTudor Barbu
 
Detecting headless browsers
Detecting headless browsersDetecting headless browsers
Detecting headless browsersSergey Shekyan
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試 政億 林
 
Automated Testing with Ruby
Automated Testing with RubyAutomated Testing with Ruby
Automated Testing with RubyKeith 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 KarmaAndrey 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 TestingLars Thorup
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introMaurice De Beijer [MVP]
 
AngularJS performance & production tips
AngularJS performance & production tipsAngularJS performance & production tips
AngularJS performance & production tipsNir 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 Jasminefoxp2code
 

Mais procurados (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
 
Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web Applications
 
Front-End Testing: Demystified
Front-End Testing: DemystifiedFront-End Testing: Demystified
Front-End Testing: Demystified
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and Karma
 
Nightwatch at Tilt
Nightwatch at TiltNightwatch at Tilt
Nightwatch at Tilt
 
AngularJS Unit Test
AngularJS Unit TestAngularJS Unit Test
AngularJS Unit Test
 
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
 
클린코드를 위한 테스트 주도 개발 1장
클린코드를 위한 테스트 주도 개발 1장클린코드를 위한 테스트 주도 개발 1장
클린코드를 위한 테스트 주도 개발 1장
 
Automated Smoke Tests with Protractor
Automated Smoke Tests with ProtractorAutomated Smoke Tests with Protractor
Automated Smoke Tests with Protractor
 
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.
 
CasperJS and PhantomJS for Automated Testing
CasperJS and PhantomJS for Automated TestingCasperJS and PhantomJS for Automated Testing
CasperJS and PhantomJS for Automated Testing
 
Testing frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTesting frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabs
 
Detecting headless browsers
Detecting headless browsersDetecting headless browsers
Detecting headless browsers
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
 
Automated Testing with Ruby
Automated Testing with RubyAutomated Testing with Ruby
Automated Testing with Ruby
 
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
 
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
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma intro
 
AngularJS performance & production tips
AngularJS performance & production tipsAngularJS performance & production tips
AngularJS performance & production tips
 
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
 

Destaque

การนับเวลาแบบสุริยคติ+547+54his p03 f03-4page
การนับเวลาแบบสุริยคติ+547+54his p03 f03-4pageการนับเวลาแบบสุริยคติ+547+54his p03 f03-4page
การนับเวลาแบบสุริยคติ+547+54his p03 f03-4pagePrachoom Rangkasikorn
 
איך מעלים תיקיות לאחסון בגוגל דרייב
איך מעלים תיקיות לאחסון בגוגל דרייבאיך מעלים תיקיות לאחסון בגוגל דרייב
איך מעלים תיקיות לאחסון בגוגל דרייבziv lapld
 
1 23 pv-aptw
1 23 pv-aptw1 23 pv-aptw
1 23 pv-aptwNiekT
 
ביטול הרשאה ממי שלא בעל הקובץ
ביטול הרשאה ממי שלא בעל הקובץביטול הרשאה ממי שלא בעל הקובץ
ביטול הרשאה ממי שלא בעל הקובץ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 gradoyisselrobles
 
Acuerdo sobre víctimas
Acuerdo sobre víctimasAcuerdo sobre víctimas
Acuerdo sobre víctimasteleSUR TV
 
Swift white paper_rmb_internationalisation_en
Swift white paper_rmb_internationalisation_enSwift white paper_rmb_internationalisation_en
Swift white paper_rmb_internationalisation_enBassam A. KASSEM
 

Destaque (12)

การนับเวลาแบบสุริยคติ+547+54his p03 f03-4page
การนับเวลาแบบสุริยคติ+547+54his p03 f03-4pageการนับเวลาแบบสุริยคติ+547+54his p03 f03-4page
การนับเวลาแบบสุริยคติ+547+54his p03 f03-4page
 
NSR 1
NSR 1NSR 1
NSR 1
 
איך מעלים תיקיות לאחסון בגוגל דרייב
איך מעלים תיקיות לאחסון בגוגל דרייבאיך מעלים תיקיות לאחסון בגוגל דרייב
איך מעלים תיקיות לאחסון בגוגל דרייב
 
Diploma
DiplomaDiploma
Diploma
 
H uwtour
H uwtourH uwtour
H uwtour
 
1 23 pv-aptw
1 23 pv-aptw1 23 pv-aptw
1 23 pv-aptw
 
ביטול הרשאה ממי שלא בעל הקובץ
ביטול הרשאה ממי שלא בעל הקובץביטול הרשאה ממי שלא בעל הקובץ
ביטול הרשאה ממי שלא בעל הקובץ
 
Reseña gomez palacio 81 106
Reseña gomez palacio 81 106Reseña gomez palacio 81 106
Reseña gomez palacio 81 106
 
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
 
MBA Without GMAT In Australia?
MBA Without GMAT In Australia?MBA Without GMAT In Australia?
MBA Without GMAT In Australia?
 
Acuerdo sobre víctimas
Acuerdo sobre víctimasAcuerdo sobre víctimas
Acuerdo sobre víctimas
 
Swift white paper_rmb_internationalisation_en
Swift white paper_rmb_internationalisation_enSwift white paper_rmb_internationalisation_en
Swift white paper_rmb_internationalisation_en
 

Semelhante a Jasmine with JS-Test-Driver

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 bigAndy Peterson
 
Test strategy for web development
Test strategy for web developmentTest strategy for web development
Test strategy for web developmentalice yang
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest servicesIoan Eugen Stan
 
Using of TDD practices for Magento
Using of TDD practices for MagentoUsing of TDD practices for Magento
Using of TDD practices for MagentoIvan Chepurnyi
 
Automated javascript unit testing
Automated javascript unit testingAutomated javascript unit testing
Automated javascript unit testingryan_chambers
 
Protractor framework architecture with example
Protractor framework architecture with exampleProtractor framework architecture with example
Protractor framework architecture with exampleshadabgilani
 
Easy tests with Selenide and Easyb
Easy tests with Selenide and EasybEasy tests with Selenide and Easyb
Easy tests with Selenide and EasybIakiv 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 SummitOrtus Solutions, Corp
 
Understanding JavaScript Testing
Understanding JavaScript TestingUnderstanding JavaScript Testing
Understanding JavaScript TestingKissy Team
 
Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016Yves 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 EngineInphina 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 EngineIndicThreads
 
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 MavenThorsten Kamann
 
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciollaJavascript tdd byandreapaciolla
Javascript tdd byandreapaciollaAndrea Paciolla
 
Compatibility Detector Tool of Chrome extensions
Compatibility Detector Tool of Chrome extensionsCompatibility Detector Tool of Chrome extensions
Compatibility Detector Tool of Chrome extensionsKai Cui
 
A few good JavaScript development tools
A few good JavaScript development toolsA few good JavaScript development tools
A few good JavaScript development toolsSimon Kim
 

Semelhante a 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
 
Test strategy for web development
Test strategy for web developmentTest strategy for web development
Test strategy for web development
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
 
Using of TDD practices for Magento
Using of TDD practices for MagentoUsing of TDD practices for Magento
Using of TDD practices for Magento
 
Gems Of Selenium
Gems Of SeleniumGems Of Selenium
Gems Of Selenium
 
Automated javascript unit testing
Automated javascript unit testingAutomated javascript unit testing
Automated javascript unit testing
 
Protractor framework architecture with example
Protractor framework architecture with exampleProtractor framework architecture with example
Protractor framework architecture with example
 
Easy tests with Selenide and Easyb
Easy tests with Selenide and EasybEasy tests with Selenide and Easyb
Easy tests with Selenide and Easyb
 
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
 
Understanding JavaScript Testing
Understanding JavaScript TestingUnderstanding JavaScript Testing
Understanding JavaScript Testing
 
Thomas Fuchs Presentation
Thomas Fuchs PresentationThomas Fuchs Presentation
Thomas Fuchs Presentation
 
Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016
 
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
 
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
 
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
 
Junit_.pptx
Junit_.pptxJunit_.pptx
Junit_.pptx
 
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciollaJavascript tdd byandreapaciolla
Javascript tdd byandreapaciolla
 
Compatibility Detector Tool of Chrome extensions
Compatibility Detector Tool of Chrome extensionsCompatibility Detector Tool of Chrome extensions
Compatibility Detector Tool of Chrome extensions
 
A few good JavaScript development tools
A few good JavaScript development toolsA few good JavaScript development tools
A few good JavaScript development tools
 

Último

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Último (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Jasmine with JS-Test-Driver

  • 1. Problem Statement / Target Ability to run JavaScript tests through commandline (not exactly headlessly) Integrate test results with the Bamboo build plan Visibility of code-coverage
  • 2. Options for JS test-runner tools Env.js and Rhino.js V8 JavaScript Engine Jasmine-Maven plug-in Jasmine-Ruby plug-in Jasmine-JsTestDriver
  • 3. Env.js & Rhino.js Uses its own JS engine Is more closer to Mozilla Firefox Still does not even behave as a mirror image of Firefox, on commandline Findings: behaves as a different browser in itself V8 JavaScript Engine Google's open source JavaScript engine, used in chrome Is a C++ code-base, needs to be compiled on local machine Pretty capable, supports Mozilla and chrome, not sure about Safari Findings: Pretty capable, but have not explored much
  • 4. Jasmine-Maven Plug-in Uses HTMLUnit for headless browser runner HTMLUnit’s only supports Firefox and IE Findings – not capable to mock Safari capabilities Jasmine-Ruby Plug-in Has major issues with the “afterEach” and “toContains” Jasmine capabilities Can run with any browser – need to open the SpecRunner.html on the browser of choice !!! Findings – Promising, but needs to evolve
  • 6. Why JsTestDriver Can run JS tests through commandline, on the browser(ant version) of choice Generates output in JUnit format, making it easier for Bamboo integration Well compatible with Jasmine Possesses code-coverage capability Had certain minor issues, which have a workaround now
  • 7. Workarounds required for JTD Not fully compatible with prototype.js – required jar fix Jasmine spy issue, was unable to remove the spies – required Jasmine-JsTestDriver Adapter fix Never closes the browser tab when test-runner completes – added a minor apple-script fix
  • 8. Testing with JTD jsTestDriver configuration server: http://localhost:9876 load: - "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 test java -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-area QOWT.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 JTD rake coverage http://quicknet/display/PROD/Generating+Code+Coverage+Reports Coverage configurations server: http://localhost:9876 load: - "../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 JTD Start the server - java -Xms512m -Xmx1024m -jar tools/jasmine-test-driver/JsTestDriver-1.2.2.jar --port 9876 Open the browser with the url- http://localhost:9876/capture Run the tests - java -Xms512m -Xmx1024m -jar tools/jasmine-test-driver/JsTestDriver-1.2.2.jar --tests all Apply the breakpoint Run the tests again
  • 12. Known issue with JTD The rake script fails to close Safari window, if it has the developer console opened !!!