Jasmine is a mature BDD test framework for JavaScript, and though powerful and feature-rich in its own right, you are often still shackled to a browser window to conduct your tests. Tools like Selenium WebDriver make automated testing possible, but they are difficult to set up, cumbersome to use, and worst of all slow. Wouldn't it be nice if you could execute your tests as part of your build? And have those tests before completed in seconds? With PhantomJS ("the headless WebKit") that wish has come true. In this talk we will introduce the Jasmine BDD test framework, introduce PhantomJS, and demonstrate how to execute your Jasmine tests in PhantomJS for lightning fast results.
The code and discussion points from this talk appear on Github: https://github.com/founddrama/vt-code-camp-2012
UPDATE (July 2014): this talk became the seed for this book that I wrote: "The PhantomJS Cookbook" - http://goo.gl/NJnFq1
An introduction to PhantomJS: A headless browser for automation test.BugRaptors
PhantomJS has a whole set of features that testers love and use for many purposes. It is primarily used for a headless testing of web applications. PhantomJS fits for both as a part of a constant integration system and universal command-line based testing. It is important to recall that PhantomJS itself is not a testing framework, it is only engaged to launch the tests through a suitable test runner.
CasperJS and PhantomJS for Automated TestingX-Team
CasperJS is a browser navigation scripting & testing utility written in Javascript for PhantomJS or SlimerJS.
PhantomJS is a scripted, headless browser used for automating web page interaction. PhantomJS provides a JavaScript API enabling automated navigation, screenshots, user behavior and assertions making it a common tool used to run browser-based unit tests in a headless system like a continuous integration environment. PhantomJS is based on Webkit making it a similar browsing environment to Safari and Google Chrome (before Chrome's fork of webkit evolved into Blink). It is open-source software released under the BSD License.
Presentation by Paul de Paula
Senior Drupal Developer at @ x-team.com
Youtube: https://www.youtube.com/watch?v=WR3Ojcfi-tY
X-Team: http://x-team.com/
A presentation on how to use Casper.js to test dynamic web applications build with Meteor.js.
Original presentation created with reveal.js, find the code here: https://github.com/perlmonkey/caspermeetsmeteor
An introduction to PhantomJS: A headless browser for automation test.BugRaptors
PhantomJS has a whole set of features that testers love and use for many purposes. It is primarily used for a headless testing of web applications. PhantomJS fits for both as a part of a constant integration system and universal command-line based testing. It is important to recall that PhantomJS itself is not a testing framework, it is only engaged to launch the tests through a suitable test runner.
CasperJS and PhantomJS for Automated TestingX-Team
CasperJS is a browser navigation scripting & testing utility written in Javascript for PhantomJS or SlimerJS.
PhantomJS is a scripted, headless browser used for automating web page interaction. PhantomJS provides a JavaScript API enabling automated navigation, screenshots, user behavior and assertions making it a common tool used to run browser-based unit tests in a headless system like a continuous integration environment. PhantomJS is based on Webkit making it a similar browsing environment to Safari and Google Chrome (before Chrome's fork of webkit evolved into Blink). It is open-source software released under the BSD License.
Presentation by Paul de Paula
Senior Drupal Developer at @ x-team.com
Youtube: https://www.youtube.com/watch?v=WR3Ojcfi-tY
X-Team: http://x-team.com/
A presentation on how to use Casper.js to test dynamic web applications build with Meteor.js.
Original presentation created with reveal.js, find the code here: https://github.com/perlmonkey/caspermeetsmeteor
Protractor plays an important role in testing AngularJS applications and works as a solution integrator combining powerful technologies like Selenium, Jasmine, Web driver, etc. It is intended not only for testing AngularJS applications but also for writing automating regression tests for normal web applications.
In this topic, our speaker has taken you through a short tour from basic steps to advanced steps to work in project. There are following main sessions:
+ Protractor introduction
+ Building up and creating a simple test script
+ Getting familiar with Cucumber
+ Using page object model (POM) with protractor and cucumber
+ Reporting
Testing frontends with nightwatch & saucelabsTudor Barbu
Sooner or later, any application needs to be released. And before that, it needs to be tested. Ideally!
The purpose of this talk is to explore Nightwatch as a testing framework, how to set up an automated CI system using Travis and using SauceLabs as a browser farm.
See for code https://github.com/motanelu/bcn-js-news-widget
Explored various java-script test-runners, which are capable of supporting JS tests on major browsers, of which JS-Test-Driver stands the most promising...
Philip Shurpik "Architecting React Native app"Fwdays
React Native становится все более зрелым фреймворком для создания кросс платформенных мобильных приложений. Доклад основан на нашем опыте создания production приложения - от архитектуры до тестирования и CI.
Рассмотрим вопрос переиспользования кода при разработке для разных платформ- что и сколько процентов можно переиспользовать и как этого достичь.
Поговорим о том, как можно очень просто сделать offline-first приложение для чтения и создания данных. И чем нам в этом могут помочь Redux и Redux persist.
Разберем, как максимально просто сделать навигацию в приложении.
И, конечно же, какое production приложение без тестирования и continuous integration? Рассмотрим компонентное тестирование с Enzyme и интеграционное с Appium. А также, как максимально приблизить процесс deploy к тому, чему мы привыкли в web, с помощью CodePush.
One of the major challenges of building rich applications for the web, is that our foundation (JavaScript in the browser) is a document viewer, not an application platform. In fact, if you show a mobile or desktop app developer the primitives we are given to start with, the typical reaction is that we’re missing many important building blocks.
All of the tools we rely on like Angular 2, React, Ember, Polymer, etc... all are, essentially, shims and hacks that we make use of while we wait for things like the W3C Web Component spec to be completed and implemented in browsers. As it becomes more feasible to build on the standards instead of a framework, it becomes important for developers to have awareness of what those standards are, what’s missing from the official spec, and how well of a job our favorite libraries do with establishing alignment.
We’ll take a close look at the W3C component spec, and compare it to the concept of a Component in the React.js library, the and the Ember.js 2 and Angular 2 frameworks. We’ll try to do a few things using native web components, involving rendering and styling an encapsulated piece of interactive UI. Along the way, we will highlight the things that we’re waiting in the W3C spec, which we’d need to land before we can start decoupling our apps from a specific third party tool, and rely on “Native Web Components”
Игорь Фесенко "Web Apps Performance & JavaScript Compilers"Fwdays
In this session I will take you through the entire process of application development and how to avoid possible issues on each stage. In a modern world turning an idea into working piece of software is a very complex process, and in this presentation, I will unlock the best practices and the essentials based on real world stories from my practical experience.
During a session I will give you a sense of Typescript, ECMAScript 2015+, JavaScriptServices, application performance management and how to make your life easier with some Node.js based tools.
"Augmented reality in your browser", Alina KarpelcevaFwdays
Immersive technologies are becoming mainstream. While Virtual Reality is a privilege of those owning headsets or visiting VR rooms, Augmented Reality is a medium available for everyone who owns a computer or a smartphone. In this talk, I will share general info about what Augmented Reality is, overview of tools available to create AR on the web, and will show how to build simple AR experiences for the browser.
Love it or hate it, JavaScript is playing an increasingly important role in the next generation of web and mobile apps. As code continues to move from the server to the client, JavaScript is being used to do more than simple HTML manipulation. Be prepared for this transition and make sure the JavaScript you write is optimized and ready to perform on desktops and devices! In this session, you will learn ten practical tips that you can use today to write faster, more maintainable, memory friendly JavaScript.
Protractor plays an important role in testing AngularJS applications and works as a solution integrator combining powerful technologies like Selenium, Jasmine, Web driver, etc. It is intended not only for testing AngularJS applications but also for writing automating regression tests for normal web applications.
In this topic, our speaker has taken you through a short tour from basic steps to advanced steps to work in project. There are following main sessions:
+ Protractor introduction
+ Building up and creating a simple test script
+ Getting familiar with Cucumber
+ Using page object model (POM) with protractor and cucumber
+ Reporting
Testing frontends with nightwatch & saucelabsTudor Barbu
Sooner or later, any application needs to be released. And before that, it needs to be tested. Ideally!
The purpose of this talk is to explore Nightwatch as a testing framework, how to set up an automated CI system using Travis and using SauceLabs as a browser farm.
See for code https://github.com/motanelu/bcn-js-news-widget
Explored various java-script test-runners, which are capable of supporting JS tests on major browsers, of which JS-Test-Driver stands the most promising...
Philip Shurpik "Architecting React Native app"Fwdays
React Native становится все более зрелым фреймворком для создания кросс платформенных мобильных приложений. Доклад основан на нашем опыте создания production приложения - от архитектуры до тестирования и CI.
Рассмотрим вопрос переиспользования кода при разработке для разных платформ- что и сколько процентов можно переиспользовать и как этого достичь.
Поговорим о том, как можно очень просто сделать offline-first приложение для чтения и создания данных. И чем нам в этом могут помочь Redux и Redux persist.
Разберем, как максимально просто сделать навигацию в приложении.
И, конечно же, какое production приложение без тестирования и continuous integration? Рассмотрим компонентное тестирование с Enzyme и интеграционное с Appium. А также, как максимально приблизить процесс deploy к тому, чему мы привыкли в web, с помощью CodePush.
One of the major challenges of building rich applications for the web, is that our foundation (JavaScript in the browser) is a document viewer, not an application platform. In fact, if you show a mobile or desktop app developer the primitives we are given to start with, the typical reaction is that we’re missing many important building blocks.
All of the tools we rely on like Angular 2, React, Ember, Polymer, etc... all are, essentially, shims and hacks that we make use of while we wait for things like the W3C Web Component spec to be completed and implemented in browsers. As it becomes more feasible to build on the standards instead of a framework, it becomes important for developers to have awareness of what those standards are, what’s missing from the official spec, and how well of a job our favorite libraries do with establishing alignment.
We’ll take a close look at the W3C component spec, and compare it to the concept of a Component in the React.js library, the and the Ember.js 2 and Angular 2 frameworks. We’ll try to do a few things using native web components, involving rendering and styling an encapsulated piece of interactive UI. Along the way, we will highlight the things that we’re waiting in the W3C spec, which we’d need to land before we can start decoupling our apps from a specific third party tool, and rely on “Native Web Components”
Игорь Фесенко "Web Apps Performance & JavaScript Compilers"Fwdays
In this session I will take you through the entire process of application development and how to avoid possible issues on each stage. In a modern world turning an idea into working piece of software is a very complex process, and in this presentation, I will unlock the best practices and the essentials based on real world stories from my practical experience.
During a session I will give you a sense of Typescript, ECMAScript 2015+, JavaScriptServices, application performance management and how to make your life easier with some Node.js based tools.
"Augmented reality in your browser", Alina KarpelcevaFwdays
Immersive technologies are becoming mainstream. While Virtual Reality is a privilege of those owning headsets or visiting VR rooms, Augmented Reality is a medium available for everyone who owns a computer or a smartphone. In this talk, I will share general info about what Augmented Reality is, overview of tools available to create AR on the web, and will show how to build simple AR experiences for the browser.
Love it or hate it, JavaScript is playing an increasingly important role in the next generation of web and mobile apps. As code continues to move from the server to the client, JavaScript is being used to do more than simple HTML manipulation. Be prepared for this transition and make sure the JavaScript you write is optimized and ready to perform on desktops and devices! In this session, you will learn ten practical tips that you can use today to write faster, more maintainable, memory friendly JavaScript.
RUM isn’t just for page level metrics anymore. Thanks to modern browser updates and new techniques we can collect real user data at the object level, finding slow page components and keeping third parties honest.
In this talk we will show you how to use Resource Timing, User Timing, and other browser tricks to time the most important components in your page. We’ll also share recipes for several of the web’s most popular third parties. This will give you a head start on measuring object level performance on your own site.
Front-end Javascript testing is a thing since 3/4 years now, but it’s still a ghost in the dev community: someone believes in it while someone else is not convinced at all.
This talk will tackle the misconceptions about testing, how and what to test, dependencies mocking and strategies to write tests in a profitable way without being afraid.
There are more smart people building software now than there have been at any point in the past, which means that it's more important than ever to stay on top of new developments, libraries, frameworks, and everything else. To really take advantage of this wealth of innovation, however, you've got to look beyond your normal community -- what's going on in Python? And how can we use that to make our Ruby lives easier? In this session, we'll explore that question. We'll look at actual examples of code and concepts borrowed and reimplemented to form a better idea of when it's appropriate and when it'll fall flat.
Page freeze, glitchy animation, and slow scrolling. They follow us everywhere, and we'd like them to stop. This talk will get to the bottom of these issues by delving into the Javascript engine and concepts like task, call-stack, and event-loops. I will also introduce several ways to tackle these problems and walk you through a demo to help you understand.
Similar to Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and PhantomJS (20)
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and PhantomJS
1. LIKE A GENIE FROM THE LAMP
Headless JavaScript Testing with Jasmine and PhantomJS
Rob Friesel @founddrama
2. WHO IS THIS GUY?
• Sr. User
Interface Developer
at Dealer.com Websystems
• out there on the web:
• @founddrama
• blog.founddrama.net
• github.com/founddrama
- first off: thanks\n- second: sorry about the cheesy title\n-- (trying to be clever, just sounds lame)\n
- other claims to fame:\n-- jshint contributor (flyweight category)\n-- helped to do some of the editing for Nicholas Zakas' Pro JS for WebDev (3rd Ed.)\n
- per title: "headless JavaScript unit testing"\n- and our toolkit? *Jasmine* and *PhantomJS*\n- (reliable) testing for your front-end code\n
- You're just clicking around, right?\n- crude methods\n
- "Anyone *not* know what unit testing is?"\n-- (brief explanation) or: "I'll skip the primer on unit testing..."\n
- "And of course we can even go all the way to TDD..."\n-- "but let's stay out of that discussion today..."\n\n
- (self-explanatory?)\n- more confident about the changes you make\n- more confident in the changes *others* make\n- builds business value b/c you can "prove" stability\n- [ASK] What else?\n
"And now for a brief overview of the JS unit testing landscape!"\n\n- "If you've unit tested in other languages before..." (usually a clear winner)\n-- results of my *totally unscientific survey*:\n--- Java: JUnit\n--- Groovy: Spock\n--- Ruby: RSpec\n--- .NET: NUnit\n--- Scala: specs\n\n"...the JavaScript unit testing landscape is... less clear..."\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Wikipedia article: 'Unit testing frameworks': table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here's just a few...\n- "The community doesn't really rally around any one solution..."\n-- "depends on what you're doing" (browser? node? some specific library?)\n-- most claim fwk/lib agnostic ("but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry's "Writing Testable JavaScript"?\n-- and/but: at some point you just need to pick one...\n
- Q. "Why Jasmine?"\n-- (funny) A. "Well, you gotta pick something..."\n-- (real) A. "BDD"\n- Q. "What is BDD?" A. "Behavior Driven Development"\n-- testing/dev methodology based loosely on TDD\n-- main difference? (as I understand it) "natural language" approach\n--- tests are written as "behaviors" - can (should!) be written by the BA\n--- ...and easily converted into tests (write your tests with your BAs)\n
DEMO : alt-tab\n- explain our utility lib + math lib\n- explain our specs/tests\n- "just scratching the surface of Jasmine here"\n- DON'T FORGET: passing tests aren't interesting\n-- make a few fail (have some failing to start with)\n- discussion? other ones we can write?\n-- max() test w/ negative numbers\n-- max w/ `0e0` formatted numbers\n-- max test w/ `Infinity`\n\n
"So now we have some unit tests -- and that's a big improvement."\n\n** BUT: **\n- this approach is not w/o its problems\n-- [ASK] chief among them? (what do you think?)\n-- you're doing it in the browser (so *that's* slow...)\n- and even if you could tolerate that... (reloading the page over and over...)\n-- ( to say nothing of dealing with multiple browsers )\n- ...what about automation? ...what about continuous integration?\n\n
AUTOMATION + CI\n\n"A little bit of a sidebar..." (but not much)\n\n- mention: Selenium, WebDriver, Geb\n- mention: BusterJS\n- mention notion of "browser lab"\n- *but* - "These are cumbersome, slow, expensive..."\n-- and most of the time it's overkill\n--- esp. for quick tests on your dev box\n
"PhantomJS!"\n- Q. "What is PhantomJS?" A. "headless WebKit" (plus explanation)\n-- *aside:* you can use it for just about anything...\n- Q. "How does this help us?"\n-- 1. A. "Gets you out of the browser refresh game."\n-- 2. A. "Sets you up for a CI strategy."\n\n- **sidebar:** won't solve all your problems; running tests in PhantomJS is like running then "just in Chrome" -- and it has everything that a browser has *except* an actual "physical" viewport (use in conjunction w/ JSHint and your regular QA)\n-- (not pictured) : imagine : add Grunt? add a watch script? connect to something like Growl?\n\n- Q. "How do you interact with PhantomJS?"\n-- A. (show a "hello world" type example and introduce the API)\n\n
- walkthrough\n-- WebPage\n-- explain what this does (which isn't much)\n-- but enough to introduce the API\n
- "Are you thinking what I'm thinking?"\n-- we have some interesting tools here\n-- we could really cobble something together...\n-- ...to solve that CI problem\n- "...fortunately..."\n-- Larry Myers has done most of the heavy-lifting for us already\n- so we have:\n-- Jasmine (test framework)\n-- PhantomJS (test environment)\n-- Larry Myers' jasmine-reporters (adapter + test runner)\n
- demo!\n- cheat sheet:\n-- $ phantomjs lib/jasmine-reporters/test/phantomjs-testrunner.js $(pwd)/test/all-tests-spec.htm\n-- remember: make sure that you fail some tests too\n-- remember: use `echo $?` to show the exit codes...\n- "Writing scripts around this can be trivial..."\n-- see also: it's also possible to wrap the tests with test runners (e.g., to run the tests as part of your regular CI tests...)\n- NOT going to actually stand up Jenkins or anything like that...\n-- "But you get the idea..."\n