SlideShare une entreprise Scribd logo
1  sur  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 … ?

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

การนับเวลาแบบสุริยคติ+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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Dernier (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

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 !!!