Most projects in CF now involve creating some type of consumable CFC Endpoint or API Service... do you Unit test your API, do you use Integration Tests on your API? How many ways do you test your API? Not all tests are created equal.
Description
Most projects in CF now involve creating some type of consumable CFC Endpoint or API Service... do you Unit test your API, do you use Integration Tests on your API? How many ways do you test your API? Not all tests are created equal.
We build our CFCs and CF API to be consumed with CF Apps, Mobile Apps, Javascript apps and devices we haven’t even thought about yet. To be smart developers we need to be able to test our CFC endpoints, and the code that uses those endpoints.
We’ll learn how to test your API serverside with Testbox and Clientside with Jasmine.
With Testbox and Jasmine both using BDD, your test code can almost be isomorphic.
Attendees should have some exposure to CFCs as endpoints, or CF API creations, and consuming with other languages/devices, in this case, JavaScript.
## Attendees will learn
How to use Testbox to test your CFCs 2 different ways
Different types and ways to test JavaScript
Overview of client/server side testing tools
Building testing into your workflow
You are one of many that are not testing your APIs thoroughly
Most projects in CF now involve creating some type of consumable CFC Endpoint or API Service... do you Unit test your API, do you use Integration Tests on your API? How many ways do you test your API? Not all tests are created equal.
We build our CFCs and CF API to be consumed with CF Apps, Mobile Apps, Javascript apps and devices we haven’t even thought about yet. To be smart developers we need to be able to test our CFC endpoints, and the code that uses those endpoints.
We’ll learn how to test your API serverside with Testbox and Clientside with Jasmine.
With Testbox and Jasmine both using BDD, your test code can almost be isomorphic.
Attendees should have some exposure to CFCs as endpoints, or CF API creations, and consuming with other languages/devices, in this case, JavaScript.
Attendees will learn
How to use Testbox to test your CFCs 2 different ways
Different types and ways to test JavaScript
Overview of client/server side testing tools
Building testing into your workflow
You are one of many that are not testing your APIs thoroughly
Cover the advantages of test driven development, the reasons for pushing it all the way to the browser level, and then explore the options for testing JavaScript, look at some examples, and then integrate the tests into our existing development workflow.
Efficient JavaScript Unit Testing, May 2012Hazem Saleh
One of the biggest challenges of many web applications is the support on the different browsers with different versions. JavaScript code that runs on Safari does not necessarily mean it will work on IE or Firefox or Google chrome. This challenge is inherited from the lack of testing the JavaScript code that lives in the presentation tier from day one. Without unit testing the JavaScript code, organization will pay much money for testing, re-testing, and re-testing web applications for just deciding upgrading or supporting new browsers. This presentation shows the solution of this problem.
Automated php unit testing in drupal 8Jay Friendly
An overview of PHPUnit Automated testing in Drupal 8, including a comparison of manual testing vs automated testing, the pros and cons of automated testing, and the types of automated tests available in Drupal 8.
BDD Testing and Automating from the trenches - Presented at Into The Box June...Gavin Pickin
In this session, we'll learn what TDD and BDD testing is in CFML and ColdFusion, using Testbox. We'll look at some of the myths surrounding testing, and how to get started with testing, and how it can make you more efficient, improve code quality, code confidence, and how automation can make your life as a developer more pleasant than what you face currently, living in the trenches
This document discusses automated testing with Codeception. It introduces test-driven development (TDD) and its benefits. Codeception allows running different types of tests (acceptance, functional, unit) from one place. Installing and using Codeception for testing Drupal is described, including generating tests, running tests, using Selenium WebDriver, cleaning up databases, and reusing test code with step objects and page objects.
Most projects in CF now involve creating some type of consumable CFC Endpoint or API Service... do you Unit test your API, do you use Integration Tests on your API? How many ways do you test your API? Not all tests are created equal.
We build our CFCs and CF API to be consumed with CF Apps, Mobile Apps, Javascript apps and devices we haven’t even thought about yet. To be smart developers we need to be able to test our CFC endpoints, and the code that uses those endpoints.
We’ll learn how to test your API serverside with Testbox and Clientside with Jasmine.
With Testbox and Jasmine both using BDD, your test code can almost be isomorphic.
Attendees should have some exposure to CFCs as endpoints, or CF API creations, and consuming with other languages/devices, in this case, JavaScript.
Attendees will learn
How to use Testbox to test your CFCs 2 different ways
Different types and ways to test JavaScript
Overview of client/server side testing tools
Building testing into your workflow
You are one of many that are not testing your APIs thoroughly
Cover the advantages of test driven development, the reasons for pushing it all the way to the browser level, and then explore the options for testing JavaScript, look at some examples, and then integrate the tests into our existing development workflow.
Efficient JavaScript Unit Testing, May 2012Hazem Saleh
One of the biggest challenges of many web applications is the support on the different browsers with different versions. JavaScript code that runs on Safari does not necessarily mean it will work on IE or Firefox or Google chrome. This challenge is inherited from the lack of testing the JavaScript code that lives in the presentation tier from day one. Without unit testing the JavaScript code, organization will pay much money for testing, re-testing, and re-testing web applications for just deciding upgrading or supporting new browsers. This presentation shows the solution of this problem.
Automated php unit testing in drupal 8Jay Friendly
An overview of PHPUnit Automated testing in Drupal 8, including a comparison of manual testing vs automated testing, the pros and cons of automated testing, and the types of automated tests available in Drupal 8.
BDD Testing and Automating from the trenches - Presented at Into The Box June...Gavin Pickin
In this session, we'll learn what TDD and BDD testing is in CFML and ColdFusion, using Testbox. We'll look at some of the myths surrounding testing, and how to get started with testing, and how it can make you more efficient, improve code quality, code confidence, and how automation can make your life as a developer more pleasant than what you face currently, living in the trenches
This document discusses automated testing with Codeception. It introduces test-driven development (TDD) and its benefits. Codeception allows running different types of tests (acceptance, functional, unit) from one place. Installing and using Codeception for testing Drupal is described, including generating tests, running tests, using Selenium WebDriver, cleaning up databases, and reusing test code with step objects and page objects.
The document provides an overview of testing JavaScript code. It discusses different types of tests like unit tests, integration tests, and end-to-end tests. It also covers testing frameworks like Jasmine, Mocha and QUnit. Additionally, it discusses ways to refactor code to make it more testable and introduces tools like Grunt to automate running tests on file changes. Finally, it demonstrates how to set up testing with Jasmine using different environments like the browser, Node.js and Sublime Text.
Presented at dev.Objective() http://www.devobjective.com/
May 14, 2015
11:30 AM - 12:30 PM
More info and resources related to presentation available here
http://www.gpickin.com/devobj2015/testablejavascript/
Everyone who wasn't writing JavaScript, probably is now. Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript. That's great, but how do we test it. In ColdFusion we have CFCs, most languages have classes... but JavaScript doesn't have classes (yet). So how do I write unit tests, what units are there, and how do I make my code look like that.
JavaScript is a flexible language, and with great flexibility comes great complexity and responsibility. Take your JavaScript spaghetti and make it unit testable.
Attendees will learn
Different types and ways to test JavaScript
Structuring your JavaScript to be unit testable
Overview of testing tools
Building testing into your workflow
You are one of many that are not testing your JavaScript
Attendees should have some exposure to JavaScript, but this is for the Professional Newbie... who always needs to learn and adapt.
Javascript unit testing, yes we can e bigAndy Peterson
This document discusses test-driven development for JavaScript using ScrewUnit and BlueRidge. It introduces the Carbon Five consulting firm and covers why JavaScript unit testing is important. It then demonstrates how to write behavioral tests using ScrewUnit's BDD style and shows a live example testing a wizard component. Some challenges of JavaScript testing like DOM cleanup and structure are addressed. The document emphasizes that JavaScript testing is possible and can be integrated into the development process.
Вы пишете е2е тесты для вашего приложения иони даже работают, но интуиция подсказывает что не так. При каждом незначительном изменении html, приходится править тесты. Со временем их тяжело читать, дописывать и поддерживать. Звучит знакомо?
В этой лекции мы обсудим примеры и практики, которые решаю эти и многие другие проблемы. Эти практики - результат, накопленный за несколько лет написания и поддержки более тысячи тестов в WIX среди разных команд.
JavaScript Test-Driven Development with Jasmine 2.0 and Karma Christopher Bartling
This document discusses JavaScript test-driven development using Jasmine 2.0 and Karma. It introduces test-driven development principles and benefits, then covers the Karma test runner, PhantomJS browser, and features of the Jasmine testing framework including describe blocks, expectations, matchers, spies, and custom matchers. It also provides an example of mapping earthquakes and testing color-coded circles using magnitude and discusses code coverage and sustaining test-driven practices.
The document discusses Nightwatch.js, an open source end-to-end testing framework for browser-based apps and websites. It uses Selenium WebDriver to perform commands and assertions on DOM elements. Key features include a clean syntax, built-in test runner, support for CSS/XPath selectors, test grouping/filtering, and CI integration. The document provides information on installation, project structure, configuration, writing tests, using page objects, test execution, and ways to extend Nightwatch's functionality through custom commands/assertions.
This document discusses testing AngularJS applications. It introduces popular testing frameworks like Jasmine and Karma that can be used to write unit tests and automate testing. Jasmine is typically used for testing AngularJS code and examples are given of writing tests with Jasmine. Karma is presented as a tool to automate testing by running tests in browsers. Protractor is introduced for end-to-end testing of front-end DOM elements. The document argues that front-end testing will become more important and integrated into development as tools continue to improve.
This document discusses using Cucumber and Capybara for behavior-driven development (BDD) testing in Ruby on Rails applications. It provides an overview of Cucumber for writing acceptance tests as plain text scenarios. It demonstrates defining a sample user login feature and scenario, and describes how to write step definitions using Capybara's domain-specific language to simulate user interactions like filling forms and clicking buttons.
Unit testing and end-to-end (E2E) testing are important types of automated testing for JavaScript applications. Unit tests focus on testing individual functions or components in isolation to catch bugs, while E2E tests ensure that user flows work as expected by interacting with the application through a browser. The presentation discussed setting up testing frameworks like Karma and Jasmine for unit testing and Protractor for E2E testing. It also covered writing testable code, handling dependencies through dependency injection, and selecting elements and interacting with them during E2E tests.
How do I write Testable Javascript so I can Test my CF API on Server and ClientGavin Pickin
The document discusses various topics related to testing APIs and web applications including:
- Different types of tests like unit tests, integration tests, and end-to-end tests
- Popular testing frameworks like Jasmine, Mocha, and TestBox
- Using testing frameworks like Jasmine with Node.js, Grunt, and in the browser
- Examples of writing tests with Jasmine and TestBox for ColdFusion applications and APIs
This document discusses test-driven development with Jasmine and Karma. It justifies TDD for JavaScript, provides an overview of TDD and its benefits. It then explains the basics of Jasmine including suites, specifications, matchers and spies. Finally it covers configuring Karma and using tools like PhantomJS for running tests and karma-coverage for generating code coverage reports.
Introductory overview of testing techniques for web application development. Explains where different testing methods fit in to the software development cycle.
For much of its existence, JavaScript has been slow. No one complained until developers created complex web applications with thousands of lines of JavaScript code. Although newer JavaScript engines have improved the situation, there’s still a lot to understand about what makes JavaScript slow and what you can do to speed up your code.
This document summarizes a presentation about using the Siesta testing framework for unit and functional testing of JavaScript code. The presentation covers the benefits of Siesta, how to write unit tests, how to do functional testing by simulating user interactions, querying components, and new features of Siesta like an improved UI, auto-scrolling, and code coverage. It also provides examples of unit tests for a user model class and discusses testing views by testing components in isolation and their public API.
Intro To JavaScript Unit Testing - Ran MizrahiRan Mizrahi
The document introduces JavaScript testing and test-driven development (TDD). It discusses why software projects fail, challenges of testing JavaScript code, and how to use the Mocha and ChaiJS frameworks for TDD and behavior-driven development (BDD). It provides an example of writing unit tests for a user service function using TDD principles, implementing the code to pass the tests, and running the tests with Mocha. Benefits of testing code include short feedback cycles, high test coverage, documentation of specifications, and less time spent debugging.
Practical tips for dealing with projects involving legacy code. Covers investigating past projects, static analysis of existing code, and methods for changing legacy code.
Presented at PHP Benelux '10
Thomas Fuchs discusses the importance of testing JavaScript code and provides examples of how to do unit testing of JavaScript with tools like Firebug, Test::Unit, and Rake. He addresses common objections to testing JavaScript and provides tips for debugging JavaScript across different browsers.
If you find yourself copying and pasting code from your build.gradle file every time you start a new project, then it's time you learn about Gradle Plugins. Come and learn what it takes to create a custom Gradle plugin for use in your Android/Java applications.
We're going to go over the following:
• Plugin Structure
• Key Components
• Testing
• Publishing
Walk away feeling empowered to create your own awesome plugins!
Most projects in CF now involve creating some type of consumable CFC Endpoint or API Service... do you Unit test your API, do you use Integration Tests on your API? How many ways do you test your API? Not all tests are created equal.
We build our CFCs and CF API to be consumed with CF Apps, Mobile Apps, Javascript apps and devices we haven’t even thought about yet. To be smart developers we need to be able to test our CFC endpoints, and the code that uses those endpoints.
We’ll learn how to test your API serverside with Testbox and Clientside with Jasmine.
With Testbox and Jasmine both using BDD, your test code can almost be isomorphic.
Attendees should have some exposure to CFCs as endpoints, or CF API creations, and consuming with other languages/devices, in this case, JavaScript.
Attendees will learn
How to use Testbox to test your CFCs 2 different ways
Different types and ways to test JavaScript
Overview of client/server side testing tools
Building testing into your workflow
You are one of many that are not testing your APIs thoroughly
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017Ortus Solutions, Corp
Testbox is a tool we all should be using to test our ColdFusion Applications which was created and is maintained by Ortus Solutions, the people that brought you ColdBox. We will have Gavin from Ortus in house on this day to go over some testbox examples, talk about its importance, and answer any questions you have.
SO --- if you have and high level questions for Gavin, reply to this post (or hit me up) so I can get the questions to Gavin a head of time just in case he needs to consult others at Ortus.
Gavin Pickin is a proud ColdFusion developer, starting with ColdFusion in the late 90s. Now working with Ortus Solutions, a leading force in CFML Development frameworks and tools, Gavin gets to work on a lot of great projects, for a big variety of clients. At Ortus Solutions, a big focus is on free and open source tools, on open source Fridays, Gavin spend most of his open source time working on ContentBox Content Management System.
This session will build up on the ColdBox RESTful services session by creating a TestBox test suite for the RESTful service. We will review everything from installing TestBox, creating BDD specs, running them in different formats and finally automate it via Jenkins for continuous integration.
The document provides an overview of testing JavaScript code. It discusses different types of tests like unit tests, integration tests, and end-to-end tests. It also covers testing frameworks like Jasmine, Mocha and QUnit. Additionally, it discusses ways to refactor code to make it more testable and introduces tools like Grunt to automate running tests on file changes. Finally, it demonstrates how to set up testing with Jasmine using different environments like the browser, Node.js and Sublime Text.
Presented at dev.Objective() http://www.devobjective.com/
May 14, 2015
11:30 AM - 12:30 PM
More info and resources related to presentation available here
http://www.gpickin.com/devobj2015/testablejavascript/
Everyone who wasn't writing JavaScript, probably is now. Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript. That's great, but how do we test it. In ColdFusion we have CFCs, most languages have classes... but JavaScript doesn't have classes (yet). So how do I write unit tests, what units are there, and how do I make my code look like that.
JavaScript is a flexible language, and with great flexibility comes great complexity and responsibility. Take your JavaScript spaghetti and make it unit testable.
Attendees will learn
Different types and ways to test JavaScript
Structuring your JavaScript to be unit testable
Overview of testing tools
Building testing into your workflow
You are one of many that are not testing your JavaScript
Attendees should have some exposure to JavaScript, but this is for the Professional Newbie... who always needs to learn and adapt.
Javascript unit testing, yes we can e bigAndy Peterson
This document discusses test-driven development for JavaScript using ScrewUnit and BlueRidge. It introduces the Carbon Five consulting firm and covers why JavaScript unit testing is important. It then demonstrates how to write behavioral tests using ScrewUnit's BDD style and shows a live example testing a wizard component. Some challenges of JavaScript testing like DOM cleanup and structure are addressed. The document emphasizes that JavaScript testing is possible and can be integrated into the development process.
Вы пишете е2е тесты для вашего приложения иони даже работают, но интуиция подсказывает что не так. При каждом незначительном изменении html, приходится править тесты. Со временем их тяжело читать, дописывать и поддерживать. Звучит знакомо?
В этой лекции мы обсудим примеры и практики, которые решаю эти и многие другие проблемы. Эти практики - результат, накопленный за несколько лет написания и поддержки более тысячи тестов в WIX среди разных команд.
JavaScript Test-Driven Development with Jasmine 2.0 and Karma Christopher Bartling
This document discusses JavaScript test-driven development using Jasmine 2.0 and Karma. It introduces test-driven development principles and benefits, then covers the Karma test runner, PhantomJS browser, and features of the Jasmine testing framework including describe blocks, expectations, matchers, spies, and custom matchers. It also provides an example of mapping earthquakes and testing color-coded circles using magnitude and discusses code coverage and sustaining test-driven practices.
The document discusses Nightwatch.js, an open source end-to-end testing framework for browser-based apps and websites. It uses Selenium WebDriver to perform commands and assertions on DOM elements. Key features include a clean syntax, built-in test runner, support for CSS/XPath selectors, test grouping/filtering, and CI integration. The document provides information on installation, project structure, configuration, writing tests, using page objects, test execution, and ways to extend Nightwatch's functionality through custom commands/assertions.
This document discusses testing AngularJS applications. It introduces popular testing frameworks like Jasmine and Karma that can be used to write unit tests and automate testing. Jasmine is typically used for testing AngularJS code and examples are given of writing tests with Jasmine. Karma is presented as a tool to automate testing by running tests in browsers. Protractor is introduced for end-to-end testing of front-end DOM elements. The document argues that front-end testing will become more important and integrated into development as tools continue to improve.
This document discusses using Cucumber and Capybara for behavior-driven development (BDD) testing in Ruby on Rails applications. It provides an overview of Cucumber for writing acceptance tests as plain text scenarios. It demonstrates defining a sample user login feature and scenario, and describes how to write step definitions using Capybara's domain-specific language to simulate user interactions like filling forms and clicking buttons.
Unit testing and end-to-end (E2E) testing are important types of automated testing for JavaScript applications. Unit tests focus on testing individual functions or components in isolation to catch bugs, while E2E tests ensure that user flows work as expected by interacting with the application through a browser. The presentation discussed setting up testing frameworks like Karma and Jasmine for unit testing and Protractor for E2E testing. It also covered writing testable code, handling dependencies through dependency injection, and selecting elements and interacting with them during E2E tests.
How do I write Testable Javascript so I can Test my CF API on Server and ClientGavin Pickin
The document discusses various topics related to testing APIs and web applications including:
- Different types of tests like unit tests, integration tests, and end-to-end tests
- Popular testing frameworks like Jasmine, Mocha, and TestBox
- Using testing frameworks like Jasmine with Node.js, Grunt, and in the browser
- Examples of writing tests with Jasmine and TestBox for ColdFusion applications and APIs
This document discusses test-driven development with Jasmine and Karma. It justifies TDD for JavaScript, provides an overview of TDD and its benefits. It then explains the basics of Jasmine including suites, specifications, matchers and spies. Finally it covers configuring Karma and using tools like PhantomJS for running tests and karma-coverage for generating code coverage reports.
Introductory overview of testing techniques for web application development. Explains where different testing methods fit in to the software development cycle.
For much of its existence, JavaScript has been slow. No one complained until developers created complex web applications with thousands of lines of JavaScript code. Although newer JavaScript engines have improved the situation, there’s still a lot to understand about what makes JavaScript slow and what you can do to speed up your code.
This document summarizes a presentation about using the Siesta testing framework for unit and functional testing of JavaScript code. The presentation covers the benefits of Siesta, how to write unit tests, how to do functional testing by simulating user interactions, querying components, and new features of Siesta like an improved UI, auto-scrolling, and code coverage. It also provides examples of unit tests for a user model class and discusses testing views by testing components in isolation and their public API.
Intro To JavaScript Unit Testing - Ran MizrahiRan Mizrahi
The document introduces JavaScript testing and test-driven development (TDD). It discusses why software projects fail, challenges of testing JavaScript code, and how to use the Mocha and ChaiJS frameworks for TDD and behavior-driven development (BDD). It provides an example of writing unit tests for a user service function using TDD principles, implementing the code to pass the tests, and running the tests with Mocha. Benefits of testing code include short feedback cycles, high test coverage, documentation of specifications, and less time spent debugging.
Practical tips for dealing with projects involving legacy code. Covers investigating past projects, static analysis of existing code, and methods for changing legacy code.
Presented at PHP Benelux '10
Thomas Fuchs discusses the importance of testing JavaScript code and provides examples of how to do unit testing of JavaScript with tools like Firebug, Test::Unit, and Rake. He addresses common objections to testing JavaScript and provides tips for debugging JavaScript across different browsers.
If you find yourself copying and pasting code from your build.gradle file every time you start a new project, then it's time you learn about Gradle Plugins. Come and learn what it takes to create a custom Gradle plugin for use in your Android/Java applications.
We're going to go over the following:
• Plugin Structure
• Key Components
• Testing
• Publishing
Walk away feeling empowered to create your own awesome plugins!
Most projects in CF now involve creating some type of consumable CFC Endpoint or API Service... do you Unit test your API, do you use Integration Tests on your API? How many ways do you test your API? Not all tests are created equal.
We build our CFCs and CF API to be consumed with CF Apps, Mobile Apps, Javascript apps and devices we haven’t even thought about yet. To be smart developers we need to be able to test our CFC endpoints, and the code that uses those endpoints.
We’ll learn how to test your API serverside with Testbox and Clientside with Jasmine.
With Testbox and Jasmine both using BDD, your test code can almost be isomorphic.
Attendees should have some exposure to CFCs as endpoints, or CF API creations, and consuming with other languages/devices, in this case, JavaScript.
Attendees will learn
How to use Testbox to test your CFCs 2 different ways
Different types and ways to test JavaScript
Overview of client/server side testing tools
Building testing into your workflow
You are one of many that are not testing your APIs thoroughly
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017Ortus Solutions, Corp
Testbox is a tool we all should be using to test our ColdFusion Applications which was created and is maintained by Ortus Solutions, the people that brought you ColdBox. We will have Gavin from Ortus in house on this day to go over some testbox examples, talk about its importance, and answer any questions you have.
SO --- if you have and high level questions for Gavin, reply to this post (or hit me up) so I can get the questions to Gavin a head of time just in case he needs to consult others at Ortus.
Gavin Pickin is a proud ColdFusion developer, starting with ColdFusion in the late 90s. Now working with Ortus Solutions, a leading force in CFML Development frameworks and tools, Gavin gets to work on a lot of great projects, for a big variety of clients. At Ortus Solutions, a big focus is on free and open source tools, on open source Fridays, Gavin spend most of his open source time working on ContentBox Content Management System.
This session will build up on the ColdBox RESTful services session by creating a TestBox test suite for the RESTful service. We will review everything from installing TestBox, creating BDD specs, running them in different formats and finally automate it via Jenkins for continuous integration.
Quick tour to front end unit testing using jasmineGil Fink
This document discusses front-end unit testing using the Jasmine testing framework. It explains why unit testing is important, introduces behavior-driven development and the Jasmine framework. It also provides an overview of setting up Jasmine, creating test suites and specs, using matchers, and testing asynchronous code. The document demonstrates how to set up the testing environment, write tests with Jasmine, and integrate Jasmine with the Karma test runner.
- Testing JavaScript code helps ensure quality and allows for refactoring and code handovers. Unit, integration, and functional testing methodologies were discussed.
- Siesta was introduced as a JavaScript testing tool that supports unit and functional testing for Ext JS and Sencha Touch. It allows simulating user interactions and verifying results.
- Writing testable code through separation of concerns, avoiding direct DOM manipulation, and supporting dependency injection were recommended to facilitate automated testing. Continuous integration was also recommended for running tests regularly.
Everyone who wasn't writing JavaScript, probably is now. Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript.
That's great, but how do we test it? In ColdFusion we have CFCs, most languages have classes... but JavaScript doesn't have classes (yet).
So how do I write unit tests, what units are there, and how do I make my code look like that? JavaScript is a flexible language, and with great flexibility comes great complexity and responsibility. Take your JavaScript spaghetti and make it unit testable.
Attendees should have some exposure to JavaScript, but this is for the Professional Newbie... who always needs to learn and adapt.
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016Gavin Pickin
Everyone who wasn't writing JavaScript, probably is now. Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript.
That's great, but how do we test it? In ColdFusion we have CFCs, most languages have classes... but JavaScript doesn't have classes (yet).
So how do I write unit tests, what units are there, and how do I make my code look like that? JavaScript is a flexible language, and with great flexibility comes great complexity and responsibility. Take your JavaScript spaghetti and make it unit testable.
Attendees should have some exposure to JavaScript, but this is for the Professional Newbie... who always needs to learn and adapt.
The document provides an overview of testing JavaScript code. It discusses different types of tests like unit tests, integration tests, and end-to-end tests. It also covers testing tools like Jasmine, Mocha and QUnit. It demonstrates how to refactor code to make it more testable and describes different testing environments like running tests in the browser or with Node.js using Grunt or other tools.
This document discusses the importance of unit testing JavaScript code. It provides reasons for testing JavaScript, such as avoiding bugs when refactoring code or introducing errors. The document discusses how to write testable JavaScript by separating business logic from views. It also recommends choosing JavaScript unit testing tools like Jasmine and Siesta, and integrating tests into continuous integration processes to run automatically on commits. Functional testing tools like Selenium are also mentioned for testing user interactions across browsers.
This document discusses automated acceptance testing for ASP.NET applications. It begins with a demonstration of using Selenium WebDriver to automate a Google search. The document then covers topics like the testing pipeline, challenges with real-world testing, focusing tests on solving specific pain points, and designing UI for testability. It emphasizes that UI tests should validate scenarios rather than individual actions and should focus on the most critical tests. The document also discusses tools, techniques, and strategies for testing databases, legacy systems, and more.
This document discusses building automated acceptance tests that are stable and maintainable for continuous delivery. It emphasizes that developers should own acceptance testing by writing tests in the same way they write production code. This includes writing many unit and regression tests, optimizing for test execution, using immutable environments like Docker for isolation, and leveraging techniques like parallelization and separation of concerns with domain-specific languages. The document also provides examples of testing strategies, tools, and processes that can help achieve this goal.
The document discusses testing strategies for migrating from Drupal 7 to Drupal 8. It introduces various testing tools that are well-suited for Drupal 8 like PHPUnit, Behat, and PhantomJS. It emphasizes the importance of acceptance testing and behavior driven development to test business value. The document also recommends writing modular object-oriented code, using autoloaders and Composer to more easily migrate code and testing between versions.
How do I Write Testable Javascript so I can Test my CF API on Server and ClientColdFusionConference
The document provides an overview of testing APIs and web applications using various testing tools and frameworks like Jasmine and Testbox. It discusses different types of tests like unit tests, integration tests, end-to-end tests etc. and how to structure code to make it more testable. It also demonstrates how to set up testing environments using standalone Jasmine, Jasmine with Node.js, Grunt and Testbox and write tests with examples. The document emphasizes the importance of testing and provides tips to improve testing workflow.
This document provides an overview of testing with Behat, a behavior-driven development framework for PHP. It discusses how Behat allows writing tests focused on describing features and behaviors using a domain-specific language. Key points include how Behat scenarios map to executable acceptance criteria, how contexts are used to define step implementations, and how Behat can be integrated with browser automation tools like Mink and Selenium to test web applications. The document also provides examples of running Behat tests against external APIs and refactoring code based on test results.
This document discusses test-driven development with JavaFX. It covers testing JavaFX applications at the unit, integration, and system levels. It also discusses continuous integration/continuous delivery and different tools that can be used for testing JavaFX applications, including TestFX, MarvinFX, JemmyFX, and Automaton. TestFX is highlighted as the recommended tool, with details provided on how to interact with JavaFX applications using its fluent API. The document also discusses using the view object pattern to write more readable tests and testing JavaFX applications that use DataFX or Afterburner.fx frameworks. It provides an example of using CDI to inject mocks when testing.
The document discusses OWASP Zed Attack Proxy (ZAP), a free and open source web application security scanner. It can be used by pentesters, developers, and testers to detect vulnerabilities. ZAP passively and actively scans applications to find issues. It can be integrated into CI/CD pipelines and automated with APIs, command line tools, and programming libraries. The document provides examples of using ZAP to perform passive scanning, active scanning, and automation for testers.
This presentation deals with a complex approach to application testing in back end and front end parts, tests writing and common mistakes. It also includes a short overview of libraries and frameworks for creation of tests, as well as practical examples of code.
Presentation by Pavlo Iuriichuk, Lead Software Engineer, GlobalLogic, Kyiv), delivered at an open techtalk on December 11, 2014.
More details - http://globallogic.com.ua/report-web-testing-techtalk-2014
UI Testing Best Practices - An Expected JourneyOren Farhi
This slide focus on the good reasons for writing unit tests for testing ui.
Much like you're testing ui manually, you can have simple minimal code doing that for you.
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
Feeling lost in the trenches of complex SQL queries and manual database interaction? Join us for a beginner-friendly mission to conquer your data with ColdFusion ORM powered by Hibernate! Whether you're a fresh recruit in the coding field or a seasoned veteran navigating legacy ColdFusion applications, this session equips you with the tools and strategies to level up your development game. We will cover ORM session management, ORM settings, caching strategies, virtual service layers, dynamic finders, dynamic counters, and an enhanced Hibernate Criteria builder for ColdFusion to create easy and programmatic HQL queries. We will even see how to build automatic CRUD APIs using only your ORM definitions. Ready to win?
Ortus Solutions is your web development expert. Planning, Design, Consulting, Mentorship, Implementation, Maintenance, and cutting-edge Software tools. All in one place.
Battlefield ORM : Learn the strategies and tactics to win with ColdFusion ORM powered by Hibernate!
We have gone through the pain and frustrations of maturing with technology such as an Object Relational Mapper (ORM) powered by Hibernate. This advanced session will cover how to leverage the ColdFusion ORM to start creating amazing, fun, and smell-great applications, and you might even see flying unicorns as well.
We will cover ORM session management, ORM settings, caching strategies, virtual service layers, dynamic finders, dynamic counters, and an enhanced Hibernate Criteria builder for ColdFusion to create easy and programmatic HQL queries. We will even see how to build automatic CRUD APIs using only your ORM definitions.
Ready to win?
You need to write a script you can call from cron to upload a directory of files to S3. Or perhaps zip log files and E-mail them? Or import a CSV into the DB. What do you use? Bash? Python? Node? No silly, you use CFML! ColdFusion developers have been able to write pure CLI scripts with CommandBox CLI for years now and it beats the pants of bash or Node. There's tools for creating interactive wizards, progress bar animations, colored console text output, and easy parameter handling. And the best thing is, CommandBox Task Runners are written in CFML so they can do anything CFML can do. Come learn how quick and easy Task Runners are to use so CFML can become the go-to language to use for anything.
Handling credentials, secrets and settings is a crucial aspect of any project. Developers must ensure that sensitive data is kept safe and secure from unauthorized access. However, ensuring safety shouldn't compromise local development convenience. Therefore, it's essential to adopt an approach that provides both security and ease of use.
“Transitioning from WordPress to ContentBox: A Powerful ColdFusion Alternative”
Are you a web developer tired of working with WordPress and its limitations? Look no further than ContentBox, a robust, open-source ColdFusion-based content management system built on the powerful ColdBox framework. While WordPress is popular due to its ease of use and extensive plugin ecosystem, it can sometimes fall short in terms of scalability and security. With ContentBox, you can enjoy the flexibility and stability of ColdFusion, a language we all know and love.
This session will introduce you to ContentBox CMS, what it is, what you can do with it, and why you should consider ContentBox for your next ColdFusion project. We will also compare it to WordPress and show why you would want to use ContentBox instead. Finally, we will discuss modern hosting options and how you can get up and running with a ContentBox site in the cloud using Digital Ocean.
This training class can be ran in GitHub codespaces with all the required software pre-installed. So just make sure you create a GitHub account, go to the repository: https://github.com/ColdBox/Building-Human-Friendly-Scheduled-Tasks and click on Start a Codesapace Button.
If not, you will need the latest CommandBox CLI installed: https://www.ortussolutions.com/products/commandbox
Come learn about of the flagship features of CommandBox Pro. CommandBox Multi-site allows you to completely replace your web server with CommandBox, hosting multiple websites all in a single process. Each site has its own web root, rewrites, logs, configuration, and HTTP bindings! This is a major new enhancement to CommandBox servers and finally bring CommandBox on par with other web servers and allows you to simplify your entire tech stack down to a single moving part for deployment.
This document provides an overview of OAuth and OpenID Connect specifications and grant types. It begins with introductions and defining key terms like tokens, scopes, and claims. It then explains the four main grant types - Authorization Code Flow, Implicit Flow, Resource Owner Password Flow, and Client Credentials Flow. The document notes extensions and recommends the Authorization Code Flow with PKCE for most use cases. It discusses related specifications around JSON Web Tokens, introspection, and revocation. It closes by emphasizing the need to understand which combination of specifications are required for a given implementation.
Some security vulnerabilities are more dangerous than others, or at least more commonly exploited. In this session, we'll look at the top 25 most dangerous software weaknesses and learn how to mitigate them in your CFML code.
Target Audience
Developers looking to learn when to use NoSQL databases over relational databases and who wonder how to model data for NoSQL
Assumed knowledge of the topic
Basic data modeling/database design principles
The objective of the topic
Learn data modeling with NoSQL databases, and how it differs from relational database data modeling., We will also look at good opportunities for using a NoSQL database and when a relational database is still the way to go. We will see why many NoSQL databases don’t pass the ACID (Atomicity, Consistency, Isolation, Durability) test on purpose and what this means to you, the developer.
In this session, you will learn how to extend and customize a ContentBox application. Get a deep understanding of leveraging custom modules and dynamic pages to create highly customized and engaging ContentBox apps.
Sometimes there are things that we need to customize to fill our business needs, and ContentBox allows you to create custom modules to take care of those special needs.
Some security vulnerabilities are more dangerous than others, or at least more commonly exploited. In this session we'll look at the top 25 most dangerous software weaknesses and learn how to mitigate them in your CFML code.
CBWIRE is a ColdBox module that makes building modern, reactive CFML apps a breeze without needing JavaScript frameworks such as Vue or React, and without the hassle of creating unnecessary APIs. In this session, we will learn CBWIRE, how to use it, and why you would want to. We also cover CBWIRE version 3, which brings a greatly simplified component syntax and many other requested features from the community.
Intended Audience
This session is intended for developers looking to build modern applications with less JavaScript. Attendees will need familiarity with ColdBox and CFML.
In this session, we will explore various practical applications the OpenAI API. We will begin with an introduction to the API and an overview of its capabilities. Then, we will examine several examples of how the API can be used, including natural language processing, chatbots, content creation, and translation. We will also take a look at cbopenai, a new ColdBox module for working with OpenAI. We will discuss how to get started with the API, including setting up an account, selecting the appropriate API, and integrating it into existing workflows. We will also explore the limitations and considerations when using OpenAI, and discuss potential advancements in practical AI.
Intended Audience
Participants should have a basic understanding of programming concepts and experience working with APIs.
A logistical look at microservice style applications created at scale from practical experience. Purpose is to present the strengths and purpose of microservice solutions to empower teams working with them or considering them for their projects. Technology will include JavaScript and Java solutions in examples. Hosting concerns will include self-hosted and cloud considerations. Some attention given to comparison to standard or monolith solutions, but not much. Q&A by design as part of this talk. Willing to refine the scope and focus to fit conference leadership preference.
Target Audience: developers, architects, managers, and teams working in or considering microservice architecture for their projects.
We all want our web apps and APIs to respond quickly and scale to dizzying heights of traffic. The traditional request/response cycle of web applications gets us part way to that goal, but it certainly won't get us to being the next Amazon. Asynchronous messaging is a powerful architectural pattern that will help us avoid fundamental problems with scaling while keeping our CFML apps fast and responsive. In this session, we'll look at how systems like Amazon's Simple Queue Service (SQS) and Simple Notification Service (SNS) - along with similar systems in Azure and Google Cloud Platform - can help you build highly responsive, highly scalable CFML apps and services.
Everyone has been hearing about Machine learning and AI for a while now, but recently, it exploded.
Like you, Ortus and the CFML Community have been playing with AI too, and one of the end results is ChatGPT Box.
AI is cool, and for some people scary, but a lot of people wonder if there is really any true value for us developers, or our businesses. In this session we’ll discuss what ChatGPT Box is, why we created it, what types of problems it solves, why we are using AI to solve those problems, and how we trained and tamed our own AI.
We will also touch on some of the science behind the scenes, to help you understand the moving parts, and how ChatGPT Box v1.0.0 is just a drop in the ocean of the possibilities, we’ll touch on some ideas we have, and in the end, using ChatGPT Box can make you a much more productive Ortusian Developer!
Gen Z and the marketplaces - let's translate their needsLaura Szabó
The product workshop focused on exploring the requirements of Generation Z in relation to marketplace dynamics. We delved into their specific needs, examined the specifics in their shopping preferences, and analyzed their preferred methods for accessing information and making purchases within a marketplace. Through the study of real-life cases , we tried to gain valuable insights into enhancing the marketplace experience for Generation Z.
The workshop was held on the DMA Conference in Vienna June 2024.
HijackLoader Evolution: Interactive Process HollowingDonato Onofri
CrowdStrike researchers have identified a HijackLoader (aka IDAT Loader) sample that employs sophisticated evasion techniques to enhance the complexity of the threat. HijackLoader, an increasingly popular tool among adversaries for deploying additional payloads and tooling, continues to evolve as its developers experiment and enhance its capabilities.
In their analysis of a recent HijackLoader sample, CrowdStrike researchers discovered new techniques designed to increase the defense evasion capabilities of the loader. The malware developer used a standard process hollowing technique coupled with an additional trigger that was activated by the parent process writing to a pipe. This new approach, called "Interactive Process Hollowing", has the potential to make defense evasion stealthier.
Discover the benefits of outsourcing SEO to Indiadavidjhones387
"Discover the benefits of outsourcing SEO to India! From cost-effective services and expert professionals to round-the-clock work advantages, learn how your business can achieve digital success with Indian SEO solutions.
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
1. 3 WAYS TO TEST YOUR
COLDFUSION API
Gavin Pickin
CFSummit() 2017
2. Agenda
● Who Am I?
● State of the Room?
● CF API
● Ways to test your API?
● Overview of Testing Tools
● Using Testing in your Workflow
● Installing Jasmine
● Installing Testbox
● Live Demo
3. Who am I?
Gavin Pickin – developing Web Apps since late 90s
● Software Consultant for Ortus Solutions
● ContentBox Evangelist
What else do you need to know?
● Blog - http://www.gpickin.com
● Twitter – http://twitter.com/gpickin
● Github - https://github.com/gpickin
Let’s get on with the show.
4. APIs in CFML
Most CF Apps are moving towards providing an API for multiple consumers
CF has many REST API Solutions and even more with CF 2016
● Built in CF
● Built in Railo/Lucee
● Coldbox API
● Taffy
5. Ways to Test your Code
● Click around in the browser yourself
● Setup Selenium / Web Driver to
click around for you
● Structured Programmatic Tests
6. Types of Testing
● Black/White Box
● Unit Testing
● Integration Testing
● Functional Tests
● System Tests
● End to End Tests
● Sanity Testing
● Regression Test
● Acceptance Tests
● Load Testing
● Stress Test
● Performance Tests
● Usability Tests
● + More
7.
8. Integration Testing
● Integration Tests several of the pieces together
● Most of the types of tests are variations of an Integration
Test
● Can include mocks but can full end to end tests including
DB / APIs
9. Unit Testing
“unit testing is a software verification and validation method in
which a programmer tests if individual units of source code
are fit for use. A unit is the smallest testable part of an
application”
- wikipedia
10. Unit Testing can...
● Can improve code quality -> quick error discovery
● Code confidence via immediate verification
● Can expose high coupling
● Will encourage refactoring to produce > testable code
● Remember: Testing is all about behavior and expectations
11. Styles – TDD vs BDD
● TDD = Test Driven Development
○ Write Tests
○ Run them and they Fail
○ Write Functions to Fulfill the Tests
○ Tests should pass
○ Refactor in confidence
Test focus on Functionality
12. Styles - TDD vs BDD
● BDD = Behavior Driven Development
Actually similar to TDD except:
● Focuses on Behavior and Specifications
● Specs (tests) are fluent and readable
● Readability makes them great for all levels of testing in the
organization
Hard to find TDD examples in JS that are not using BDD describe and it
blocks
13. TDD Example
Test( ‘Email address must not be blank’, function(){
notEqual(email, “”, "failed");
});
14. BDD Example
Describe( ‘Email Address’, function(){
It(‘should not be blank’, function(){
expect(email).not.toBe(“”);
});
});
19. CF Testing Tools
* MxUnit was the standard
* TestBox is the new standard
Other options
20. TestBox
TestBox is a next generation testing framework for ColdFusion
(CFML) that is based on BDD (Behavior Driven Development)
for providing a clean obvious syntax for writing tests.
It contains not only a testing framework, runner, assertions
and expectations library but also ships with MockBox, A
Mocking & Stubbing Framework,.
It also supports xUnit style of testing and MXUnit
compatibilities.
22. TestBox BDD Example
describe("Hello world function", function() {
it(”contains the word world", function() {
expect(helloWorld()).toContain("world");
});
});
23. TestBox New BDD Example
feature( "Box Size", function(){
describe( "In order to know what size box I need
As a distribution manager
I want to know the volume of the box", function(){
scenario( "Get box volume", function(){
given( "I have entered a width of 20
And a height of 30
And a depth of 40", function(){
when( "I run the calculation", function(){
then( "the result should be 24000", function(){
26. Jasmine
*Jasmine comes ready to go out of the box
*Fluent Syntax – BDD Style
*Includes lots of matchers
*Has spies included
*Very popular, lots of support
*Angular uses Jasmine with Karma (CLI)
*Headless running and plays well with CI servers
27. Jasmine - Cons
Async testing in 1.3 can be a headache
*Async testing in 2.0 is hard to find
blog posts on (I need to write one)
*Expects *spec.js suffix for test files
*This can be modified depending on
how you are running the tests
28. Jasmine – Sample Test
describe("Hello world function", function() {
it(”contains the word world", function() {
expect(helloWorld()).toContain("world");
});
});
29. Mocha
*Simple Setup
*Simple Async testing
*Works great with other Assertion libraries like Chai ( not
included )
*Solid Support with CI Servers, with Plugins for others
*Opinion says Mocha blazing the trail for new features
30. Mocha - Cons
*Requires other Libraries for key features
*No Assertion Library included
*No Mocking / Spied included
*Need to create the runner manually
*Newer to the game so not as popular or supported as
others but gaining traction.
31. Mocha – BDD Sample Test
var expect = require('chai').expect;
describe(’Hello World Function', function(){
it('should contain the word world', function(){
expect(helloWorld()).to.contain(’world');
})
})
32. QUnit
*The oldest of the main testing frameworks
*Is popular due to use in jQuery and age
*Ember’s default Unit testing Framework
33. QUnit - Cons
*Development slowed down since
2013 (but still under development)
*Syntax – No BDD style
*Assertion libraries – limited matchers
35. Using Testing in your Workflow
*Using HTML Test Runners
*Keep a Browser open
*F5 refresh tests
36. Command Line Tests
*Run Jasmine – manual
*Run tests at the end of each section of work
*Run Grunt-Watch – automatic
*Runs Jasmine on every file change
*Grunt can run other tasks as well,
minification etc
37. Testing in your IDE
*Browser Views
*Eclipse allows you to open files in web view
– uses HTML Runner
*Run Jasmine / Grunt / Karma in IDE Console
*Fairly Easy to setup
*See Demo– Sublime Text 2 (if we have time)
38. Live Demo and Examples
*Install / Run Jasmine Standalone for Browser
*Install / Run Jasmine with NodeJs
*Install / Run Jasmine with Grunt Watch
*Install / Run Testbox in Browser
*Install / Run Testbox with Grunt Watch
*Install / Run Grunt Watch inside Sublime Text 2
39. Install / Run Jasmine for In-Browser Testing
Download standalone package from Github (I have 2.1.3)
https://github.com/jasmine/jasmine/tree/master/dist
Unzip into your /tests folder
Run /tests/SpecRunner.html to see example tests
45. Installing Jasmine with NodeJS
Edit Jasmine.json to update Locations for Spec Files and Helper Files
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"helpers/**/*.js"
]
}
46. Running Jasmine Tests with NodeJS
$ Jasmine
Started
F
Failures:
1) A suite contains spec with an expectation
Message:
Expected true to be false.
Stack:
Error: Expected true to be false.
at Object.<anonymous>
(/Users/gavinpickin/Dropbox/Apps/testApp/www/spec/test_spec.js:3:1
8)
1 spec, 1 failure
47. Running Jasmine Tests with NodeJS
*Jasmine-Node is great for Node
*Jasmine Node doesn’t have a headless browser
*Hard to test Browser code
*So what should I use?
51. Configuring Jasmine with Grunt Watcher
// gruntfile.js part 3
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-watch');
};
52. Example Jasmine Spec with Grunt Watcher
describe("Forgotten Password Form", function() {
it("should warn you if the email is invalid before making Ajax Call", function() {
expect( isEmailInputInvalid('') ).toBe(true);
expect( isEmailInputInvalid('dddddddddd') ).toBe(true);
expect( isEmailInputInvalid('dddddd@') ).toBe(true);
expect( isEmailInputInvalid('dddddd@ddddd') ).toBe(true);
expect( isEmailInputInvalid('dddddd@ddddddd.') ).toBe(true);
expect( isEmailInputInvalid('dddddd@ddddddd.com') ).toBe(false);
});
});
53. Example Jasmine Spec with Grunt Watcher
describe("Login Form", function() {
it("should set status correct status message with successful Ajax
Response", function() {
spyOn( window, "setStatusMessage");
processLoginAjaxDone('{"RESULT":"200"}');
expect(setStatusMessage).toHaveBeenCalled();
expect(setStatusMessage).toHaveBeenCalledWith(
‘TARDIS Access Granted - Please wait for the Doctor to take you for
a spin');
56. Unit Tests and Async Calls
*You want Unit Tests to test the unit and not it’s
dependencies
*You want Unit Tests to run quick
*You should mock the API in the Ajax call
*But we want to test the API
*So essentially, we’re writing an integration test.
57. How to wait for Async
describe("Login API", function() {
beforeEach(function( done ) {
spyOn( window, "processLoginAjaxDone").and.callFake(
function(){ done(); });
spyOn( window, "processLoginAjaxFail").and.callFake(
function(){ done(); });
loginButtonEventHandlerProcess('gavin@gavin.co.nz', 'password');
});
it("should return a failing Ajax Response", function() { });
});
58. How to wait for Async
describe("Login API", function() {
beforeEach(function( done ) {
…
});
it("should return a failing Ajax Response", function() {
expect(processLoginAjaxDone).toHaveBeenCalled();
expect(processLoginAjaxDone).toHaveBeenCalledWith(
'{"RESULT":400}');
expect(processLoginAjaxFail).not.toHaveBeenCalled();
});
62. Create a Test Suite
// tests/specs/CFCTest.cfc
component extends="testbox.system.BaseSpec" {
function run() {
it( "will error with incorrect login", function(){
var oTest = new cfcs.userServiceRemote();
expect( oTest.login( 'gavin@gavin.com',
'topsecret').result ).toBe('400');
});
}
63. Create a 2nd Test Suite// tests/specs/APITest.cfc
component extends="testbox.system.BaseSpec" {
function run() {
describe("userService API Login", function(){
it( "will error with incorrect login", function(){
var email = "gavin@gavin.com";
var password = "topsecret”;
var result = "";
http
url="http://www.testableapi.local.com:8504/cfcs/userServiceRemote.cfc?method=log
in&email=#email#&password=#password#" result="result”;
expect( DeserializeJSON(result.filecontent).result ).toBe('400');
});
});
65. Running Testbox via
CommandBox
CommandBox has some handy features to make
TestBox tests easier. Just add to box.json
"testbox":{
"runner" :"http://www.testableapi.local.com:8504/tests/runner.cfm"
}
$ testbox run
67. Browser -Create a runner.cfm
*<cfsetting showDebugOutput="false">
*<!--- Executes all tests in the 'specs' folder with simple reporter
by default --->
*<cfparam name="url.reporter" default="simple">
*<cfparam name="url.directory"
default="tests.specs">
*<cfparam name="url.recurse" default="true"
type="boolean">
*<cfparam name="url.bundles" default="">
*<cfparam name="url.labels" default="">
*<!--- Include the TestBox HTML Runner --->
77. Testbox Runner JSON
*Testbox has several runners, you have seen the HTML one, this
Runner uses the JSON runner and then formats it.
*http://www.testableapi.local.com:8504/tests/runner.cfm?rep
orter=JSON&directory=%2Ftests%2Fspecs&recurse=true
78. Running in Sublime Text 2
*Install PackageControl into Sublime Text
*Install Grunt from PackageControl
*https://packagecontrol.io/packages/Grunt
*Update Grunt Sublime Settings for paths
{
"exec_args": { "path": "/bin:/usr/bin:/usr/local/bin” }
}
*Then Command Shift P – grunt
ERRORS ON MY
MACHINE TODAY
81. ColdBox REST API
*It’s easy to get started with ColdBox Rest with
CommandBox’s scaffolding.
## create app
coldbox create app name=MyRestAPP skeleton=rest
## Start up a server with rewrites on port 8505
server start port=8505
83. My Testing Videos
NVCFUG Meetup 2017 - Testing is natural, testing is fun, not everybody does
it but everybody should!
http://experts.adobeconnect.com/testboxortusinh/
ODW 2015 - Testing my API with TestBox on Server and Jasmine on Client
http://experts.adobeconnect.com/p6akdiyds21/
CBW 2014 - Mockbox, get ready to mock your socks off
Video: https://vimeo.com/112238773
Slides:
https://docs.google.com/file/d/0B_65i6I500NiN1BoVmVmaFh5dlBXd2ljV1NuY
1d3WEtxdUt3/edit
84. Other Testing Videos
ODW2017 - Testing my Non-ColdBox site with TestBox - Nolan Erck
https://vimeo.com/241813746
ODW 2016 - Testing Automation - Luis Majano
https://vimeo.com/194169908
ODW 2016 - Integrated - A TestBox packe for even better Integration Tests - Eric Peterson
https://vimeo.com/194168660
ODW 2016 - Code Coverage for CFML - Brad Wood
https://vimeo.com/194134971
ODW 2015 - TestBox BDD - Luis Majano
https://vimeo.com/148262563
CBDW 2013 - Mocking and Stubbing - Luis Majano
https://vimeo.com/groups/coldbox/videos/68861083
85. My Other Videos
ODW 2017 - Real World ContentBox Microservices
https://vimeo.com/241813747
Containers Roadshow 2017 - Playing with Docker with Gavin Pickin
https://vimeo.com/groups/coldbox/videos/236135671
ContentBox Roadshow 2016 - What's new with ContentBox 3
https://t.co/CdPTM4FFAh
ContentBox Roadshow 2016 - ContentBox Administration 101
http://experts.adobeconnect.com/p2vx8nqb3wd/
ContentBox Roadshow 2016 - ContentBoxContentBox Modules Deep Dive
http://experts.adobeconnect.com/p7d7h77mivb/
ODW 2016 - ContentBox CMS Deep Dive
http://experts.adobeconnect.com/p4yd4a6n5bj/
86. My Other Videos - cont
ODW 2015 - Relax with ColdBox RESTFul Services
http://experts.adobeconnect.com/p67qaf48xum/
ODW 2015 - Getting Started With ContentBox
http://experts.adobeconnect.com/p249qn543je/
CBDW 2013 - Learning ColdBox through Testing
https://vimeo.com/groups/coldbox/videos/69995315