SlideShare a Scribd company logo
Just Do It! ColdBox
Integration Testing
A V I R T U A L E X P E R I E N C E
A V I R T U A L E X P E R I E N C E
About Me
• Javier Quintero
• Systems Engineer
• Born in Colombia => Living in
Houston, Texas
• Java and Coldfusion Developer
• Currently working for Ortus
Solutions
A V I R T U A L E X P E R I E N C E
Content
• Introduction
• Testing Foundations
• Intro to TestBox
• BDD Testing
• ColdBox Integration Testing
• Suites and Specs
• Expectations
• Matchers
• MockBox
• Mocking Data
What are Integration Tests?
Integration testing is a level of
software testing where individual
units are combined and tested as
a group. The purpose of this level
of testing is to expose faults in the
interaction between integrated
units. Test drivers and test stubs
are used to assist in Integration
Testing.
A V I R T U A L E X P E R I E N C E
A V I R T U A L E X P E R I E N C E
Why this is important?
• Integration tests allow you to test
your application by covering the
real use cases.
• It’s the extension of unit testing.
• Integration testing takes a
smaller unit of unit testing and
tests their behavior as the whole.
A V I R T U A L E X P E R I E N C E
Advantages of Integration Testing
• Tests run faster compared to end to
end tests.
• Confidence in the development
cycle is high.
• Easy to integrate with daily builds
and easy to test in development
environment.
• Tests are more reliable and easy to
isolate the failures.
• Majorly helps to build real-time use
cases during the end to end testing.
A V I R T U A L E X P E R I E N C E
When should we test?
•Always!
• No more excuses!
• Test your code and make it
part of your development
process.
A V I R T U A L E X P E R I E N C E
How to test your ColdBox App
A V I R T U A L E X P E R I E N C E
> CommandBox to the rescue
• Install TestBox
• install testbox –savedev
TestBox Command Help
• testbox help
TestBox Generations
• testbox create bdd
Even Run Tests
• Testbox run
A V I R T U A L E X P E R I E N C E
ColdBox Testing
• ColdBox has specific testing classes for
• Integration
• Event Handlers
• Interceptors
• Model Objects
Tools
ColdBox Testing
A V I R T U A L E X P E R I E N C E
ColdBox tightly integrates to MockBox
and TestBox
A V I R T U A L E X P E R I E N C E
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.
• TestBox 4.0.0 released last week!
• TestBox Output Utilities
• Mocking Data
A V I R T U A L E X P E R I E N C E
MockBox
• TestBox includes a mocking and
stubbing library called MockBox.
• No need to install a separate libary, it
is part of TestBox!
• MockBox allows you to create mock
and stub objects.
A V I R T U A L E X P E R I E N C E
BDD
• BDD stands for behavior driven
development and is highly based on
creating specifications and
expectations of results in a readable
DSL (Domain Specifc Language).
BDD Relationship
A V I R T U A L E X P E R I E N C E
Requirements to Integration Tests
Req 1
Req 2
Req 3
MyBDDTest
ColdBox Test Suite
ColdBox Application
templates includes a test
folder
• Collection of
• Tests
• Runners
• Automation,
resources
• Includes its own
Application.cfc
A V I R T U A L E X P E R I E N C E
ColdBox Test Classes
A V I R T U A L E X P E R I E N C E
* The BaseTestCase - Used for Integration Testing
A V I R T U A L E X P E R I E N C E
Capabilities
• BaseTestCase gives you the ability to test
your ColdBox Application headlessly
• Test everything top-down: DI, AOP, Cache,
executions, etc.
• Test real requirements: Can I login, Can I
shop, Can I logout
• Tests must have the ability to talk to your
application
• Same server, mappings, orm config, etc
• You can even test relocations
• You can also test view/layout renderings
A V I R T U A L E X P E R I E N C E
Grouping Your Tests
//tests/specs/MySpec.cfc
component extends="testbox.system.BaseSpec"{
// executes before all suites
function beforeAll(){}
// executes after all suites
function afterAll(){}
// All suites go in here
function run( testResults, testBox ){
}
}
• Suites
• Specs
Test Annotations
A V I R T U A L E X P E R I E N C E
A V I R T U A L E X P E R I E N C E
Describing Your Tests
function run( testResults, testBox ){
describe("A suite", function(){
it("contains spec with an awesome expectation", function(){
expect( true ).toBeTrue();
});
it("contains spec with a failure expectation", function(){
expect( true ).toBeFalse();
});
});
}
The describe() function is also aliased with the following names:
story(), feature(), scenario(), given(), when()
Suites: A test suite in TestBox is a collection of specifications that will model what
you want to test.
Specs Arguments
A V I R T U A L E X P E R I E N C E
Full arguments list
A V I R T U A L E X P E R I E N C E
Specs
function run(){
describe("A suite", function(){
it("contains spec with an awesome expectation", function(){
expect( true ).toBeTrue();
});
it("contains a spec with more than 1 expectation", function(){
expect( [1,2,3] ).toBeArray();
expect( [1,2,3] ).toHaveLength( 3 );
});
});
}
A spec is a declaration that will usually test your system with a requirement.
The it() function is also aliased as then()
Specs Arguments
A V I R T U A L E X P E R I E N C E
Full arguments list
A V I R T U A L E X P E R I E N C E
Closure Functions
• They can execute code that is necessary to implement the test.
• CFML rules of scoping are applied to closures.
• Always use the variables scope for easy access and distinction.
function run(){
describe("A suite is a closure", function(){
c = new Calculator();
it("and so is a spec", function(){
expect( c ).toBeTypeOf( 'component' );
});
});
}
A V I R T U A L E X P E R I E N C E
Expectactions
A V I R T U A L E X P E R I E N C E
Expectations
• Self-concatenated strings that evaluate an
actual value to an expected value or
condition.
• expect() -> Takes in a value called the actual
value .
• expectAll() -> Takes in an array or struct
which will be the actual value.
• Concatenate the matchers.
• Multiple evaluations on a single actual value.
A V I R T U A L E X P E R I E N C E
Matchers
Each matcher implements a comparison or evaluation of the actual value and an
expected value or condition.
function run(){
describe("The 'toBe' matcher evaluates equality", function(){
it("and has a positive case", function(){
expect( true ).toBe( true );
});
it("and has a negative case", function(){
expect( false ).notToBe( true );
});
});
describe("Collection expectations", function(){
it( "can be done easily with TestBox", function(){
expectAll( {a:2,b:4,c:6} ).toSatisfy( function(x){ return 0 == x%2; });
});
});
}
Matchers
A V I R T U A L E X P E R I E N C E
Most common matchers
• toBeTrue( [message] ) : value to true
• toBeFalse( [message] ) : value to be false
• toBe( expected, [message] ) : Assert something is equal to each other, no case is required
• toBeWithCase( expected, [message] ) : Expects with case
• toBeNull( [message] ) : Expects the value to be null
• toBeInstanceOf( class, [message] ) : To be the class instance passed
• toMatch( regex, [message] ) : Matches a string with no case-sensitivity
• toMatchWithCase( regex, [message] ) : Matches with case-sensitivity
• toBeTypeOf( type, [message] ) : Assert the type of the incoming actual data, it uses the internal
ColdFusion isValid() function behind the scenes, type can be array, binary, boolean, component,
date, time, float, numeric, integer, query, string, struct, url, uuid plus all the ones from isValid()
• toBe({type}( [message] ) : Same as above but more readable method name. Example: .toBeStruct(),
.toBeArray()
• toBeEmpty( [message] ) : Tests if an array or struct or string or query is empty
• toHaveKey( key, [message] ) : Tests the existence of one key in a structure or hash map
Each matcher implements a comparison or evaluation of the actual value and an expected value or
condition.
Matchers
A V I R T U A L E X P E R I E N C E
Most common matchers
• toHaveDeepKey( key, [message] ) : Assert that a given key exists in the passed in struct by
searching the entire nested structure
• toHaveLength( length, [message] ) : Assert the size of a given string, array, structure or query
• toThrow( [type], [regex], [message] );
• toBeCloseTo( expected, delta, [datepart], [message] ) : Can be used to approximate numbers or
dates according to the expected and delta arguments. For date ranges use the datepart values.
• toBeBetween( min, max, [message] ) : Assert that the passed in actual number or date is between
the passed in min and max values
• toInclude( needle, [message] ) : Assert that the given "needle" argument exists in the incoming
string or array with no case-sensitivity, needle in a haystack anyone?
• toIncludeWithCase( needle, [message] ) : Assert that the given "needle" argument exists in the
incoming string or array with case-sensitivity, needle in a haystack anyone?
• toBeGT( target, [message] ) : Assert that the actual value is greater than the target value
• toBeGTE( target, [message] ) : Assert that the actual value is greater than or equal the target value
• toBeLT( target, [message] ) : Assert that the actual value is less than the target value
• toBeLTE( target, [message] ) : Assert that the actual value is less than or equal the target value
The complete list can be found in the official API Docs site
http://apidocs.ortussolutions.com/testbox/current
A V I R T U A L E X P E R I E N C E
Custom Matchers
• Create your own matcher if you don’t find it in the Docs
boolean function MyMatcher( required expectation, args={} )
boolean function reallyFalse( expectation, args={} ){
expectation.message = (
structKeyExists( args, "message" ) ? args.message :
”[#expectation.actual#] is not really false"
);
if( expectation.isNot )
return ( expectation.actual eq true );
else
return ( expectation.actual eq false );
}
}
A V I R T U A L E X P E R I E N C E
Custom Matchers
• Create your own matcher if you don’t find it in the Docs
boolean function MyMatcher( required expectation, args={} )
boolean function reallyFalse( expectation, args={} ){
expectation.message = (
structKeyExists( args, "message" ) ? args.message :
”[#expectation.actual#] is not really false"
);
if( expectation.isNot )
return ( expectation.actual eq true );
else
return ( expectation.actual eq false );
}
}
A V I R T U A L E X P E R I E N C E
The setup() Method
• This is how ColdBox simulates a request
• Must be called in a setup() or beforeEach()
context
• If not, everything looks like the same request
function run(){
describe( "Settings Suite", function(){
beforeEach( function( currentSpec ){
setup();
} );
});
}
Setup()
Test1
Test3
Test4
Test2
A V I R T U A L E X P E R I E N C E
The execute() Method
The execute() method is your way of making requests in to your
ColdBox application.
Create your test or spec
Set FORM/URL scopes or Headers to simulate
incoming data
Execute the event, it returns an event object (Request
Context)
Do your expectations/assertions
The execute() Method
A V I R T U A L E X P E R I E N C E
ican take the following parameters:
The Handler To Test
A V I R T U A L E X P E R I E N C E
component extends="coldbox.system.EventHandler"{
// Default Action
function index( event, rc, prc ){
prc.welcomeMessage = "Welcome to ITB 2020!";
event.setView( "main/index” );
}
// Do something
function doSomething( event, rc, prc ){
relocate( "main.index” );
}
}
Main handler
The Integration Test
A V I R T U A L E X P E R I E N C E
function run(){
describe( "Main Handler", function(){
beforeEach(function( currentSpec ){
setup();
});
it( "+homepage renders", function(){
var event = execute( event="main.index", renderResults=true );
expect( event.getValue( name="welcomemessage", private=true ) ).toBe( "Welcome to ITB 2020!" );
});
it( "+doSomething relocates", function(){
var event = execute( event="main.doSomething" );
expect(event.getValue( "relocate_event", "" ) ).toBe( "main.index" );
});
});
}
Main handler
A V I R T U A L E X P E R I E N C E
Mocking Data
A V I R T U A L E X P E R I E N C E
Mocking Data
• MockDataCFC dependency included since
version 4.x
• Generate fake data as JSON REST service, a
ColdBox Module or a simple CFC Service API
• MockDataCFC allows you to define the
return data model in a very deterministic and
simple modeling DSL.
Mocking Types
A V I R T U A L E X P E R I E N C E
MockDataCFC supports the following types
• age: Generates a random "adult" age of 18 to 75.
• all_age: Generates a random age of 1 to 100.
• autoincrement: Returns an incremented index starting from 1
• baconlorem: Returns bacon lorem ipsum text. If used as baconlorem:N, returns N paragraphs. If
used as baconlorem:X Y, returns a random number of paragraphs between X and Y.
• date: Generates a random date
• datetime: Generates a random date and time value
• email: Generates a random email.
• fname: Generates a random first name.
• imageurl : Generates a random image URL with a random protocol
• imageurl_http : Generates a random image URL with http only protocol
• imageurl_https : Generates a random image URL with https only protocol
• ipaddress : Generates an ipv4 address
• name: Generates a random name.
• lname: Generates a random last name.
• lorem: Returns lorem ipsum text. If used as lorem:N, returns N paragraphs. If used as lorem:X Y,
returns a random number of paragraphs between X and Y.
• num: By default, a number from 1 to 10. You can also use the form num:X for a random number
between 1 and X. Or num:X Y for a random number between X and Y.
Mocking Types
A V I R T U A L E X P E R I E N C E
More types…
• One of:X y: Requires you to pass N values after it delimited by a colon. Example: oneof:male:
female. Will return a random value from that list.
• rnd:N, rand:N, rnd:X y, rand:X y : Generate random numbers with a specific range or range cap.
• sentence: Generates a sentences. If used as sentence:N, returns N sentences. If used as
sentence:X Y, returns a random number of sentences beetween X and Y.
• ssn: Generates a random Social Security number.
• string: Generates a random string of length 10 by default. You can increase the length by passing it
string:length.
• tel: Generates a random (American) telephone number.
• uuid: Generates a random UUID
• url : Generates a random URL with a random protocol
• url_http : Generates a random URL with http only protocol
• url_https : Generates a random URL with https only protocol
• website : Generates a random website with random protocol
• website_http : Generates a random website, http only protocol
• website_https : Generates a random website, https only protocol
• words: Generates a single word. If used as word:N, returns N words. If used as words:X Y, returns a
random number of words between X and Y.
A V I R T U A L E X P E R I E N C E
Mocking Examples
A V I R T U A L E X P E R I E N C E
Tests Output Utilities
Produce output from your tests
Let’s Put All Together
A V I R T U A L E X P E R I E N C E
A V I R T U A L E X P E R I E N C E
Create The Integration Test
• Let’s use Commandbox to generate the
integration tests for us.
• coldbox create integration-test handler=main actions=show,create,delete
A V I R T U A L E X P E R I E N C E
Life Cycle Methods
A V I R T U A L E X P E R I E N C E
Test suite and specs
A V I R T U A L E X P E R I E N C E
Let’s create our integration test
for the show action
A V I R T U A L E X P E R I E N C E
Let’s create our integration test
for the create action
A V I R T U A L E X P E R I E N C E
Let’s create our integration test
for the delete action
A V I R T U A L E X P E R I E N C E
Run Your Tests
A V I R T U A L E X P E R I E N C E
Gracias!
Javier Quintero
Web Developer
Ortus Solutions, Corp
A V I R T U A L E X P E R I E N C E
@xavikintero
@ortussolutions
Ad

More Related Content

What's hot (19)

20111018 boost and gtest
20111018 boost and gtest20111018 boost and gtest
20111018 boost and gtest
Will Shen
 
Breaking Dependencies to Allow Unit Testing
Breaking Dependencies to Allow Unit TestingBreaking Dependencies to Allow Unit Testing
Breaking Dependencies to Allow Unit Testing
Steven Smith
 
JUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit TestsJUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit Tests
John Ferguson Smart Limited
 
Tests and Testability: Apex Structure and Strategy
Tests and Testability: Apex Structure and StrategyTests and Testability: Apex Structure and Strategy
Tests and Testability: Apex Structure and Strategy
Salesforce Developers
 
Interaction testing using mock objects
Interaction testing using mock objectsInteraction testing using mock objects
Interaction testing using mock objects
Lim Chanmann
 
Oleksandr Valetskyy - Increase the quality of your code with property-based t...
Oleksandr Valetskyy - Increase the quality of your code with property-based t...Oleksandr Valetskyy - Increase the quality of your code with property-based t...
Oleksandr Valetskyy - Increase the quality of your code with property-based t...
Oleksandr Valetskyy
 
Qunit Java script Un
Qunit Java script UnQunit Java script Un
Qunit Java script Un
akanksha arora
 
«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...
«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...
«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...
it-people
 
Effective Readable unit testing with junit5
Effective Readable unit testing with junit5Effective Readable unit testing with junit5
Effective Readable unit testing with junit5
Sajith Vijesekara
 
C++ Unit Test with Google Testing Framework
C++ Unit Test with Google Testing FrameworkC++ Unit Test with Google Testing Framework
C++ Unit Test with Google Testing Framework
Humberto Marchezi
 
How To Test Everything
How To Test EverythingHow To Test Everything
How To Test Everything
noelrap
 
Effective Unit Testing
Effective Unit TestingEffective Unit Testing
Effective Unit Testing
Narendra Pathai
 
Test driven development
Test driven developmentTest driven development
Test driven development
christoforosnalmpantis
 
Testing akka-actors
Testing akka-actorsTesting akka-actors
Testing akka-actors
Knoldus Inc.
 
Gallio Crafting A Toolchain
Gallio Crafting A ToolchainGallio Crafting A Toolchain
Gallio Crafting A Toolchain
ConSanFrancisco123
 
Modern Python Testing
Modern Python TestingModern Python Testing
Modern Python Testing
Alexander Loechel
 
Lecture: Advanced Reflection. MetaLinks
Lecture: Advanced Reflection. MetaLinksLecture: Advanced Reflection. MetaLinks
Lecture: Advanced Reflection. MetaLinks
Marcus Denker
 
Testing most things in JavaScript - LeedsJS 31/05/2017
Testing most things in JavaScript - LeedsJS 31/05/2017Testing most things in JavaScript - LeedsJS 31/05/2017
Testing most things in JavaScript - LeedsJS 31/05/2017
Colin Oakley
 
Google mock for dummies
Google mock for dummiesGoogle mock for dummies
Google mock for dummies
Harry Potter
 
20111018 boost and gtest
20111018 boost and gtest20111018 boost and gtest
20111018 boost and gtest
Will Shen
 
Breaking Dependencies to Allow Unit Testing
Breaking Dependencies to Allow Unit TestingBreaking Dependencies to Allow Unit Testing
Breaking Dependencies to Allow Unit Testing
Steven Smith
 
JUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit TestsJUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit Tests
John Ferguson Smart Limited
 
Tests and Testability: Apex Structure and Strategy
Tests and Testability: Apex Structure and StrategyTests and Testability: Apex Structure and Strategy
Tests and Testability: Apex Structure and Strategy
Salesforce Developers
 
Interaction testing using mock objects
Interaction testing using mock objectsInteraction testing using mock objects
Interaction testing using mock objects
Lim Chanmann
 
Oleksandr Valetskyy - Increase the quality of your code with property-based t...
Oleksandr Valetskyy - Increase the quality of your code with property-based t...Oleksandr Valetskyy - Increase the quality of your code with property-based t...
Oleksandr Valetskyy - Increase the quality of your code with property-based t...
Oleksandr Valetskyy
 
«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...
«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...
«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...
it-people
 
Effective Readable unit testing with junit5
Effective Readable unit testing with junit5Effective Readable unit testing with junit5
Effective Readable unit testing with junit5
Sajith Vijesekara
 
C++ Unit Test with Google Testing Framework
C++ Unit Test with Google Testing FrameworkC++ Unit Test with Google Testing Framework
C++ Unit Test with Google Testing Framework
Humberto Marchezi
 
How To Test Everything
How To Test EverythingHow To Test Everything
How To Test Everything
noelrap
 
Testing akka-actors
Testing akka-actorsTesting akka-actors
Testing akka-actors
Knoldus Inc.
 
Lecture: Advanced Reflection. MetaLinks
Lecture: Advanced Reflection. MetaLinksLecture: Advanced Reflection. MetaLinks
Lecture: Advanced Reflection. MetaLinks
Marcus Denker
 
Testing most things in JavaScript - LeedsJS 31/05/2017
Testing most things in JavaScript - LeedsJS 31/05/2017Testing most things in JavaScript - LeedsJS 31/05/2017
Testing most things in JavaScript - LeedsJS 31/05/2017
Colin Oakley
 
Google mock for dummies
Google mock for dummiesGoogle mock for dummies
Google mock for dummies
Harry Potter
 

Similar to Just Do It! ColdBox Integration Testing (20)

Test box bdd
Test box bddTest box bdd
Test box bdd
ColdFusionConference
 
Mastering PowerShell Testing with Pester
Mastering PowerShell Testing with PesterMastering PowerShell Testing with Pester
Mastering PowerShell Testing with Pester
Mark Wragg
 
Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFX
Hendrik Ebbers
 
CBDW2014 - Behavior Driven Development with TestBox
CBDW2014 - Behavior Driven Development with TestBoxCBDW2014 - Behavior Driven Development with TestBox
CBDW2014 - Behavior Driven Development with TestBox
Ortus Solutions, Corp
 
Unit tests and TDD
Unit tests and TDDUnit tests and TDD
Unit tests and TDD
Roman Okolovich
 
2. overview of c#
2. overview of c#2. overview of c#
2. overview of c#
Rohit Rao
 
Qt test framework
Qt test frameworkQt test framework
Qt test framework
ICS
 
DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)
Steve Upton
 
2CPP16 - STL
2CPP16 - STL2CPP16 - STL
2CPP16 - STL
Michael Heron
 
Testing And Mxunit In ColdFusion
Testing And Mxunit In ColdFusionTesting And Mxunit In ColdFusion
Testing And Mxunit In ColdFusion
Denard Springle IV
 
Adding unit tests to the database deployment pipeline
Adding unit tests to the database deployment pipelineAdding unit tests to the database deployment pipeline
Adding unit tests to the database deployment pipeline
Eduardo Piairo
 
Adding unit tests to the database deployment pipeline
Adding unit tests to the database deployment pipelineAdding unit tests to the database deployment pipeline
Adding unit tests to the database deployment pipeline
Eduardo Piairo
 
Unit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUG
egoodwintx
 
C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#
Hawkman Academy
 
Into The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applicationsInto The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applications
Ortus Solutions, Corp
 
Shshsjsjsjs-4 - Copdjsjjsjsjsjakakakaaky.pptx
Shshsjsjsjs-4 - Copdjsjjsjsjsjakakakaaky.pptxShshsjsjsjs-4 - Copdjsjjsjsjsjakakakaaky.pptx
Shshsjsjsjs-4 - Copdjsjjsjsjsjakakakaaky.pptx
086ChintanPatel1
 
Why you should be using the shiny new C# 6.0 features now!
Why you should be using the shiny new C# 6.0 features now!Why you should be using the shiny new C# 6.0 features now!
Why you should be using the shiny new C# 6.0 features now!
Eric Phan
 
Java Fx
Java FxJava Fx
Java Fx
Karthik Sankar
 
Java Unit Test - JUnit
Java Unit Test - JUnitJava Unit Test - JUnit
Java Unit Test - JUnit
Aktuğ Urun
 
Adding unit tests with tSQLt to the database deployment pipeline
 Adding unit tests with tSQLt to the database deployment pipeline Adding unit tests with tSQLt to the database deployment pipeline
Adding unit tests with tSQLt to the database deployment pipeline
Eduardo Piairo
 
Mastering PowerShell Testing with Pester
Mastering PowerShell Testing with PesterMastering PowerShell Testing with Pester
Mastering PowerShell Testing with Pester
Mark Wragg
 
Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFX
Hendrik Ebbers
 
CBDW2014 - Behavior Driven Development with TestBox
CBDW2014 - Behavior Driven Development with TestBoxCBDW2014 - Behavior Driven Development with TestBox
CBDW2014 - Behavior Driven Development with TestBox
Ortus Solutions, Corp
 
2. overview of c#
2. overview of c#2. overview of c#
2. overview of c#
Rohit Rao
 
Qt test framework
Qt test frameworkQt test framework
Qt test framework
ICS
 
DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)
Steve Upton
 
Testing And Mxunit In ColdFusion
Testing And Mxunit In ColdFusionTesting And Mxunit In ColdFusion
Testing And Mxunit In ColdFusion
Denard Springle IV
 
Adding unit tests to the database deployment pipeline
Adding unit tests to the database deployment pipelineAdding unit tests to the database deployment pipeline
Adding unit tests to the database deployment pipeline
Eduardo Piairo
 
Adding unit tests to the database deployment pipeline
Adding unit tests to the database deployment pipelineAdding unit tests to the database deployment pipeline
Adding unit tests to the database deployment pipeline
Eduardo Piairo
 
Unit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUG
egoodwintx
 
C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#
Hawkman Academy
 
Into The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applicationsInto The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applications
Ortus Solutions, Corp
 
Shshsjsjsjs-4 - Copdjsjjsjsjsjakakakaaky.pptx
Shshsjsjsjs-4 - Copdjsjjsjsjsjakakakaaky.pptxShshsjsjsjs-4 - Copdjsjjsjsjsjakakakaaky.pptx
Shshsjsjsjs-4 - Copdjsjjsjsjsjakakakaaky.pptx
086ChintanPatel1
 
Why you should be using the shiny new C# 6.0 features now!
Why you should be using the shiny new C# 6.0 features now!Why you should be using the shiny new C# 6.0 features now!
Why you should be using the shiny new C# 6.0 features now!
Eric Phan
 
Java Unit Test - JUnit
Java Unit Test - JUnitJava Unit Test - JUnit
Java Unit Test - JUnit
Aktuğ Urun
 
Adding unit tests with tSQLt to the database deployment pipeline
 Adding unit tests with tSQLt to the database deployment pipeline Adding unit tests with tSQLt to the database deployment pipeline
Adding unit tests with tSQLt to the database deployment pipeline
Eduardo Piairo
 
Ad

More from Ortus Solutions, Corp (20)

Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
I am afraid of no test! The power of BDD
I am afraid of no test! The power of BDDI am afraid of no test! The power of BDD
I am afraid of no test! The power of BDD
Ortus Solutions, Corp
 
BoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is DynamicBoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is Dynamic
Ortus Solutions, Corp
 
Building Dynamic AWS Lambda Applications with BoxLang
Building Dynamic AWS Lambda Applications with BoxLangBuilding Dynamic AWS Lambda Applications with BoxLang
Building Dynamic AWS Lambda Applications with BoxLang
Ortus Solutions, Corp
 
A Summary of “Out of the Tar Pit” by Jacob Beers
A Summary of “Out of the Tar Pit” by Jacob BeersA Summary of “Out of the Tar Pit” by Jacob Beers
A Summary of “Out of the Tar Pit” by Jacob Beers
Ortus Solutions, Corp
 
Modern Functional Fluent CFML REST by Luis Majano
Modern Functional Fluent CFML REST by Luis MajanoModern Functional Fluent CFML REST by Luis Majano
Modern Functional Fluent CFML REST by Luis Majano
Ortus Solutions, Corp
 
BoxLang DNA - Feature: World-Class Support
BoxLang DNA - Feature: World-Class SupportBoxLang DNA - Feature: World-Class Support
BoxLang DNA - Feature: World-Class Support
Ortus Solutions, Corp
 
ITB 2023 cbq - Jobs And Tasks In the Background - Eric Peterson.pdf
ITB 2023 cbq - Jobs And Tasks In the Background - Eric Peterson.pdfITB 2023 cbq - Jobs And Tasks In the Background - Eric Peterson.pdf
ITB 2023 cbq - Jobs And Tasks In the Background - Eric Peterson.pdf
Ortus Solutions, Corp
 
ITB 2023 - cbElasticSearch Modern Searching for Modern CFML - Jon Clausen.pdf
ITB 2023 - cbElasticSearch Modern Searching for Modern CFML - Jon Clausen.pdfITB 2023 - cbElasticSearch Modern Searching for Modern CFML - Jon Clausen.pdf
ITB 2023 - cbElasticSearch Modern Searching for Modern CFML - Jon Clausen.pdf
Ortus Solutions, Corp
 
ITB 2023 Modernizing the App A tale from the trenches- David Paul Belanger.pdf
ITB 2023 Modernizing the App A tale from the trenches- David Paul Belanger.pdfITB 2023 Modernizing the App A tale from the trenches- David Paul Belanger.pdf
ITB 2023 Modernizing the App A tale from the trenches- David Paul Belanger.pdf
Ortus Solutions, Corp
 
ITB 2023 Creating and managing a QA focused production-replicating environmen...
ITB 2023 Creating and managing a QA focused production-replicating environmen...ITB 2023 Creating and managing a QA focused production-replicating environmen...
ITB 2023 Creating and managing a QA focused production-replicating environmen...
Ortus Solutions, Corp
 
ITB 2023 10 Techniques for writing easy yet stupidly thorough unit tests_Dan ...
ITB 2023 10 Techniques for writing easy yet stupidly thorough unit tests_Dan ...ITB 2023 10 Techniques for writing easy yet stupidly thorough unit tests_Dan ...
ITB 2023 10 Techniques for writing easy yet stupidly thorough unit tests_Dan ...
Ortus Solutions, Corp
 
ITB 2023 Headless eCommerce with CFML - Jon Clausen.pdf
ITB 2023 Headless eCommerce with CFML - Jon Clausen.pdfITB 2023 Headless eCommerce with CFML - Jon Clausen.pdf
ITB 2023 Headless eCommerce with CFML - Jon Clausen.pdf
Ortus Solutions, Corp
 
Crash Course in CSS Grid plus FlexBox - Nolan Erck
Crash Course in CSS Grid plus FlexBox - Nolan ErckCrash Course in CSS Grid plus FlexBox - Nolan Erck
Crash Course in CSS Grid plus FlexBox - Nolan Erck
Ortus Solutions, Corp
 
ITB 2023 - 800 Pounds Gorilla - a Design session for no designers - Jona Lain...
ITB 2023 - 800 Pounds Gorilla - a Design session for no designers - Jona Lain...ITB 2023 - 800 Pounds Gorilla - a Design session for no designers - Jona Lain...
ITB 2023 - 800 Pounds Gorilla - a Design session for no designers - Jona Lain...
Ortus Solutions, Corp
 
ITB 2023 cbPlaywright End-to-end Tests with Playwright and TestBox - Eric Pet...
ITB 2023 cbPlaywright End-to-end Tests with Playwright and TestBox - Eric Pet...ITB 2023 cbPlaywright End-to-end Tests with Playwright and TestBox - Eric Pet...
ITB 2023 cbPlaywright End-to-end Tests with Playwright and TestBox - Eric Pet...
Ortus Solutions, Corp
 
ITB 2023 - The Many Layers of OAuth - Keith Casey .pdf
ITB 2023 - The Many Layers of OAuth - Keith Casey .pdfITB 2023 - The Many Layers of OAuth - Keith Casey .pdf
ITB 2023 - The Many Layers of OAuth - Keith Casey .pdf
Ortus Solutions, Corp
 
ITB 2023 - Chatgpt Box! AI All The Things - Scott Steinbeck.pdf
ITB 2023 - Chatgpt Box! AI All The Things - Scott Steinbeck.pdfITB 2023 - Chatgpt Box! AI All The Things - Scott Steinbeck.pdf
ITB 2023 - Chatgpt Box! AI All The Things - Scott Steinbeck.pdf
Ortus Solutions, Corp
 
ITB 2023 Build Vue Apps Using tdd (Test-Driven Development).pptx
ITB 2023 Build Vue Apps Using tdd (Test-Driven Development).pptxITB 2023 Build Vue Apps Using tdd (Test-Driven Development).pptx
ITB 2023 Build Vue Apps Using tdd (Test-Driven Development).pptx
Ortus Solutions, Corp
 
ITB 2023 - Create as many web sites or web apps as you want - George Murphy.pdf
ITB 2023 - Create as many web sites or web apps as you want - George Murphy.pdfITB 2023 - Create as many web sites or web apps as you want - George Murphy.pdf
ITB 2023 - Create as many web sites or web apps as you want - George Murphy.pdf
Ortus Solutions, Corp
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
I am afraid of no test! The power of BDD
I am afraid of no test! The power of BDDI am afraid of no test! The power of BDD
I am afraid of no test! The power of BDD
Ortus Solutions, Corp
 
BoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is DynamicBoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is Dynamic
Ortus Solutions, Corp
 
Building Dynamic AWS Lambda Applications with BoxLang
Building Dynamic AWS Lambda Applications with BoxLangBuilding Dynamic AWS Lambda Applications with BoxLang
Building Dynamic AWS Lambda Applications with BoxLang
Ortus Solutions, Corp
 
A Summary of “Out of the Tar Pit” by Jacob Beers
A Summary of “Out of the Tar Pit” by Jacob BeersA Summary of “Out of the Tar Pit” by Jacob Beers
A Summary of “Out of the Tar Pit” by Jacob Beers
Ortus Solutions, Corp
 
Modern Functional Fluent CFML REST by Luis Majano
Modern Functional Fluent CFML REST by Luis MajanoModern Functional Fluent CFML REST by Luis Majano
Modern Functional Fluent CFML REST by Luis Majano
Ortus Solutions, Corp
 
BoxLang DNA - Feature: World-Class Support
BoxLang DNA - Feature: World-Class SupportBoxLang DNA - Feature: World-Class Support
BoxLang DNA - Feature: World-Class Support
Ortus Solutions, Corp
 
ITB 2023 cbq - Jobs And Tasks In the Background - Eric Peterson.pdf
ITB 2023 cbq - Jobs And Tasks In the Background - Eric Peterson.pdfITB 2023 cbq - Jobs And Tasks In the Background - Eric Peterson.pdf
ITB 2023 cbq - Jobs And Tasks In the Background - Eric Peterson.pdf
Ortus Solutions, Corp
 
ITB 2023 - cbElasticSearch Modern Searching for Modern CFML - Jon Clausen.pdf
ITB 2023 - cbElasticSearch Modern Searching for Modern CFML - Jon Clausen.pdfITB 2023 - cbElasticSearch Modern Searching for Modern CFML - Jon Clausen.pdf
ITB 2023 - cbElasticSearch Modern Searching for Modern CFML - Jon Clausen.pdf
Ortus Solutions, Corp
 
ITB 2023 Modernizing the App A tale from the trenches- David Paul Belanger.pdf
ITB 2023 Modernizing the App A tale from the trenches- David Paul Belanger.pdfITB 2023 Modernizing the App A tale from the trenches- David Paul Belanger.pdf
ITB 2023 Modernizing the App A tale from the trenches- David Paul Belanger.pdf
Ortus Solutions, Corp
 
ITB 2023 Creating and managing a QA focused production-replicating environmen...
ITB 2023 Creating and managing a QA focused production-replicating environmen...ITB 2023 Creating and managing a QA focused production-replicating environmen...
ITB 2023 Creating and managing a QA focused production-replicating environmen...
Ortus Solutions, Corp
 
ITB 2023 10 Techniques for writing easy yet stupidly thorough unit tests_Dan ...
ITB 2023 10 Techniques for writing easy yet stupidly thorough unit tests_Dan ...ITB 2023 10 Techniques for writing easy yet stupidly thorough unit tests_Dan ...
ITB 2023 10 Techniques for writing easy yet stupidly thorough unit tests_Dan ...
Ortus Solutions, Corp
 
ITB 2023 Headless eCommerce with CFML - Jon Clausen.pdf
ITB 2023 Headless eCommerce with CFML - Jon Clausen.pdfITB 2023 Headless eCommerce with CFML - Jon Clausen.pdf
ITB 2023 Headless eCommerce with CFML - Jon Clausen.pdf
Ortus Solutions, Corp
 
Crash Course in CSS Grid plus FlexBox - Nolan Erck
Crash Course in CSS Grid plus FlexBox - Nolan ErckCrash Course in CSS Grid plus FlexBox - Nolan Erck
Crash Course in CSS Grid plus FlexBox - Nolan Erck
Ortus Solutions, Corp
 
ITB 2023 - 800 Pounds Gorilla - a Design session for no designers - Jona Lain...
ITB 2023 - 800 Pounds Gorilla - a Design session for no designers - Jona Lain...ITB 2023 - 800 Pounds Gorilla - a Design session for no designers - Jona Lain...
ITB 2023 - 800 Pounds Gorilla - a Design session for no designers - Jona Lain...
Ortus Solutions, Corp
 
ITB 2023 cbPlaywright End-to-end Tests with Playwright and TestBox - Eric Pet...
ITB 2023 cbPlaywright End-to-end Tests with Playwright and TestBox - Eric Pet...ITB 2023 cbPlaywright End-to-end Tests with Playwright and TestBox - Eric Pet...
ITB 2023 cbPlaywright End-to-end Tests with Playwright and TestBox - Eric Pet...
Ortus Solutions, Corp
 
ITB 2023 - The Many Layers of OAuth - Keith Casey .pdf
ITB 2023 - The Many Layers of OAuth - Keith Casey .pdfITB 2023 - The Many Layers of OAuth - Keith Casey .pdf
ITB 2023 - The Many Layers of OAuth - Keith Casey .pdf
Ortus Solutions, Corp
 
ITB 2023 - Chatgpt Box! AI All The Things - Scott Steinbeck.pdf
ITB 2023 - Chatgpt Box! AI All The Things - Scott Steinbeck.pdfITB 2023 - Chatgpt Box! AI All The Things - Scott Steinbeck.pdf
ITB 2023 - Chatgpt Box! AI All The Things - Scott Steinbeck.pdf
Ortus Solutions, Corp
 
ITB 2023 Build Vue Apps Using tdd (Test-Driven Development).pptx
ITB 2023 Build Vue Apps Using tdd (Test-Driven Development).pptxITB 2023 Build Vue Apps Using tdd (Test-Driven Development).pptx
ITB 2023 Build Vue Apps Using tdd (Test-Driven Development).pptx
Ortus Solutions, Corp
 
ITB 2023 - Create as many web sites or web apps as you want - George Murphy.pdf
ITB 2023 - Create as many web sites or web apps as you want - George Murphy.pdfITB 2023 - Create as many web sites or web apps as you want - George Murphy.pdf
ITB 2023 - Create as many web sites or web apps as you want - George Murphy.pdf
Ortus Solutions, Corp
 
Ad

Recently uploaded (20)

Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 

Just Do It! ColdBox Integration Testing

  • 1. Just Do It! ColdBox Integration Testing A V I R T U A L E X P E R I E N C E
  • 2. A V I R T U A L E X P E R I E N C E About Me • Javier Quintero • Systems Engineer • Born in Colombia => Living in Houston, Texas • Java and Coldfusion Developer • Currently working for Ortus Solutions
  • 3. A V I R T U A L E X P E R I E N C E Content • Introduction • Testing Foundations • Intro to TestBox • BDD Testing • ColdBox Integration Testing • Suites and Specs • Expectations • Matchers • MockBox • Mocking Data
  • 4. What are Integration Tests? Integration testing is a level of software testing where individual units are combined and tested as a group. The purpose of this level of testing is to expose faults in the interaction between integrated units. Test drivers and test stubs are used to assist in Integration Testing. A V I R T U A L E X P E R I E N C E
  • 5. A V I R T U A L E X P E R I E N C E Why this is important? • Integration tests allow you to test your application by covering the real use cases. • It’s the extension of unit testing. • Integration testing takes a smaller unit of unit testing and tests their behavior as the whole.
  • 6. A V I R T U A L E X P E R I E N C E Advantages of Integration Testing • Tests run faster compared to end to end tests. • Confidence in the development cycle is high. • Easy to integrate with daily builds and easy to test in development environment. • Tests are more reliable and easy to isolate the failures. • Majorly helps to build real-time use cases during the end to end testing.
  • 7. A V I R T U A L E X P E R I E N C E When should we test? •Always! • No more excuses! • Test your code and make it part of your development process.
  • 8. A V I R T U A L E X P E R I E N C E How to test your ColdBox App
  • 9. A V I R T U A L E X P E R I E N C E > CommandBox to the rescue • Install TestBox • install testbox –savedev TestBox Command Help • testbox help TestBox Generations • testbox create bdd Even Run Tests • Testbox run
  • 10. A V I R T U A L E X P E R I E N C E ColdBox Testing • ColdBox has specific testing classes for • Integration • Event Handlers • Interceptors • Model Objects
  • 11. Tools ColdBox Testing A V I R T U A L E X P E R I E N C E ColdBox tightly integrates to MockBox and TestBox
  • 12. A V I R T U A L E X P E R I E N C E 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. • TestBox 4.0.0 released last week! • TestBox Output Utilities • Mocking Data
  • 13. A V I R T U A L E X P E R I E N C E MockBox • TestBox includes a mocking and stubbing library called MockBox. • No need to install a separate libary, it is part of TestBox! • MockBox allows you to create mock and stub objects.
  • 14. A V I R T U A L E X P E R I E N C E BDD • BDD stands for behavior driven development and is highly based on creating specifications and expectations of results in a readable DSL (Domain Specifc Language).
  • 15. BDD Relationship A V I R T U A L E X P E R I E N C E Requirements to Integration Tests Req 1 Req 2 Req 3 MyBDDTest
  • 16. ColdBox Test Suite ColdBox Application templates includes a test folder • Collection of • Tests • Runners • Automation, resources • Includes its own Application.cfc A V I R T U A L E X P E R I E N C E
  • 17. ColdBox Test Classes A V I R T U A L E X P E R I E N C E * The BaseTestCase - Used for Integration Testing
  • 18. A V I R T U A L E X P E R I E N C E Capabilities • BaseTestCase gives you the ability to test your ColdBox Application headlessly • Test everything top-down: DI, AOP, Cache, executions, etc. • Test real requirements: Can I login, Can I shop, Can I logout • Tests must have the ability to talk to your application • Same server, mappings, orm config, etc • You can even test relocations • You can also test view/layout renderings
  • 19. A V I R T U A L E X P E R I E N C E Grouping Your Tests //tests/specs/MySpec.cfc component extends="testbox.system.BaseSpec"{ // executes before all suites function beforeAll(){} // executes after all suites function afterAll(){} // All suites go in here function run( testResults, testBox ){ } } • Suites • Specs
  • 20. Test Annotations A V I R T U A L E X P E R I E N C E
  • 21. A V I R T U A L E X P E R I E N C E Describing Your Tests function run( testResults, testBox ){ describe("A suite", function(){ it("contains spec with an awesome expectation", function(){ expect( true ).toBeTrue(); }); it("contains spec with a failure expectation", function(){ expect( true ).toBeFalse(); }); }); } The describe() function is also aliased with the following names: story(), feature(), scenario(), given(), when() Suites: A test suite in TestBox is a collection of specifications that will model what you want to test.
  • 22. Specs Arguments A V I R T U A L E X P E R I E N C E Full arguments list
  • 23. A V I R T U A L E X P E R I E N C E Specs function run(){ describe("A suite", function(){ it("contains spec with an awesome expectation", function(){ expect( true ).toBeTrue(); }); it("contains a spec with more than 1 expectation", function(){ expect( [1,2,3] ).toBeArray(); expect( [1,2,3] ).toHaveLength( 3 ); }); }); } A spec is a declaration that will usually test your system with a requirement. The it() function is also aliased as then()
  • 24. Specs Arguments A V I R T U A L E X P E R I E N C E Full arguments list
  • 25. A V I R T U A L E X P E R I E N C E Closure Functions • They can execute code that is necessary to implement the test. • CFML rules of scoping are applied to closures. • Always use the variables scope for easy access and distinction. function run(){ describe("A suite is a closure", function(){ c = new Calculator(); it("and so is a spec", function(){ expect( c ).toBeTypeOf( 'component' ); }); }); }
  • 26. A V I R T U A L E X P E R I E N C E Expectactions
  • 27. A V I R T U A L E X P E R I E N C E Expectations • Self-concatenated strings that evaluate an actual value to an expected value or condition. • expect() -> Takes in a value called the actual value . • expectAll() -> Takes in an array or struct which will be the actual value. • Concatenate the matchers. • Multiple evaluations on a single actual value.
  • 28. A V I R T U A L E X P E R I E N C E Matchers Each matcher implements a comparison or evaluation of the actual value and an expected value or condition. function run(){ describe("The 'toBe' matcher evaluates equality", function(){ it("and has a positive case", function(){ expect( true ).toBe( true ); }); it("and has a negative case", function(){ expect( false ).notToBe( true ); }); }); describe("Collection expectations", function(){ it( "can be done easily with TestBox", function(){ expectAll( {a:2,b:4,c:6} ).toSatisfy( function(x){ return 0 == x%2; }); }); }); }
  • 29. Matchers A V I R T U A L E X P E R I E N C E Most common matchers • toBeTrue( [message] ) : value to true • toBeFalse( [message] ) : value to be false • toBe( expected, [message] ) : Assert something is equal to each other, no case is required • toBeWithCase( expected, [message] ) : Expects with case • toBeNull( [message] ) : Expects the value to be null • toBeInstanceOf( class, [message] ) : To be the class instance passed • toMatch( regex, [message] ) : Matches a string with no case-sensitivity • toMatchWithCase( regex, [message] ) : Matches with case-sensitivity • toBeTypeOf( type, [message] ) : Assert the type of the incoming actual data, it uses the internal ColdFusion isValid() function behind the scenes, type can be array, binary, boolean, component, date, time, float, numeric, integer, query, string, struct, url, uuid plus all the ones from isValid() • toBe({type}( [message] ) : Same as above but more readable method name. Example: .toBeStruct(), .toBeArray() • toBeEmpty( [message] ) : Tests if an array or struct or string or query is empty • toHaveKey( key, [message] ) : Tests the existence of one key in a structure or hash map Each matcher implements a comparison or evaluation of the actual value and an expected value or condition.
  • 30. Matchers A V I R T U A L E X P E R I E N C E Most common matchers • toHaveDeepKey( key, [message] ) : Assert that a given key exists in the passed in struct by searching the entire nested structure • toHaveLength( length, [message] ) : Assert the size of a given string, array, structure or query • toThrow( [type], [regex], [message] ); • toBeCloseTo( expected, delta, [datepart], [message] ) : Can be used to approximate numbers or dates according to the expected and delta arguments. For date ranges use the datepart values. • toBeBetween( min, max, [message] ) : Assert that the passed in actual number or date is between the passed in min and max values • toInclude( needle, [message] ) : Assert that the given "needle" argument exists in the incoming string or array with no case-sensitivity, needle in a haystack anyone? • toIncludeWithCase( needle, [message] ) : Assert that the given "needle" argument exists in the incoming string or array with case-sensitivity, needle in a haystack anyone? • toBeGT( target, [message] ) : Assert that the actual value is greater than the target value • toBeGTE( target, [message] ) : Assert that the actual value is greater than or equal the target value • toBeLT( target, [message] ) : Assert that the actual value is less than the target value • toBeLTE( target, [message] ) : Assert that the actual value is less than or equal the target value The complete list can be found in the official API Docs site http://apidocs.ortussolutions.com/testbox/current
  • 31. A V I R T U A L E X P E R I E N C E Custom Matchers • Create your own matcher if you don’t find it in the Docs boolean function MyMatcher( required expectation, args={} ) boolean function reallyFalse( expectation, args={} ){ expectation.message = ( structKeyExists( args, "message" ) ? args.message : ”[#expectation.actual#] is not really false" ); if( expectation.isNot ) return ( expectation.actual eq true ); else return ( expectation.actual eq false ); } }
  • 32. A V I R T U A L E X P E R I E N C E Custom Matchers • Create your own matcher if you don’t find it in the Docs boolean function MyMatcher( required expectation, args={} ) boolean function reallyFalse( expectation, args={} ){ expectation.message = ( structKeyExists( args, "message" ) ? args.message : ”[#expectation.actual#] is not really false" ); if( expectation.isNot ) return ( expectation.actual eq true ); else return ( expectation.actual eq false ); } }
  • 33. A V I R T U A L E X P E R I E N C E The setup() Method • This is how ColdBox simulates a request • Must be called in a setup() or beforeEach() context • If not, everything looks like the same request function run(){ describe( "Settings Suite", function(){ beforeEach( function( currentSpec ){ setup(); } ); }); } Setup() Test1 Test3 Test4 Test2
  • 34. A V I R T U A L E X P E R I E N C E The execute() Method The execute() method is your way of making requests in to your ColdBox application. Create your test or spec Set FORM/URL scopes or Headers to simulate incoming data Execute the event, it returns an event object (Request Context) Do your expectations/assertions
  • 35. The execute() Method A V I R T U A L E X P E R I E N C E ican take the following parameters:
  • 36. The Handler To Test A V I R T U A L E X P E R I E N C E component extends="coldbox.system.EventHandler"{ // Default Action function index( event, rc, prc ){ prc.welcomeMessage = "Welcome to ITB 2020!"; event.setView( "main/index” ); } // Do something function doSomething( event, rc, prc ){ relocate( "main.index” ); } } Main handler
  • 37. The Integration Test A V I R T U A L E X P E R I E N C E function run(){ describe( "Main Handler", function(){ beforeEach(function( currentSpec ){ setup(); }); it( "+homepage renders", function(){ var event = execute( event="main.index", renderResults=true ); expect( event.getValue( name="welcomemessage", private=true ) ).toBe( "Welcome to ITB 2020!" ); }); it( "+doSomething relocates", function(){ var event = execute( event="main.doSomething" ); expect(event.getValue( "relocate_event", "" ) ).toBe( "main.index" ); }); }); } Main handler
  • 38. A V I R T U A L E X P E R I E N C E Mocking Data
  • 39. A V I R T U A L E X P E R I E N C E Mocking Data • MockDataCFC dependency included since version 4.x • Generate fake data as JSON REST service, a ColdBox Module or a simple CFC Service API • MockDataCFC allows you to define the return data model in a very deterministic and simple modeling DSL.
  • 40. Mocking Types A V I R T U A L E X P E R I E N C E MockDataCFC supports the following types • age: Generates a random "adult" age of 18 to 75. • all_age: Generates a random age of 1 to 100. • autoincrement: Returns an incremented index starting from 1 • baconlorem: Returns bacon lorem ipsum text. If used as baconlorem:N, returns N paragraphs. If used as baconlorem:X Y, returns a random number of paragraphs between X and Y. • date: Generates a random date • datetime: Generates a random date and time value • email: Generates a random email. • fname: Generates a random first name. • imageurl : Generates a random image URL with a random protocol • imageurl_http : Generates a random image URL with http only protocol • imageurl_https : Generates a random image URL with https only protocol • ipaddress : Generates an ipv4 address • name: Generates a random name. • lname: Generates a random last name. • lorem: Returns lorem ipsum text. If used as lorem:N, returns N paragraphs. If used as lorem:X Y, returns a random number of paragraphs between X and Y. • num: By default, a number from 1 to 10. You can also use the form num:X for a random number between 1 and X. Or num:X Y for a random number between X and Y.
  • 41. Mocking Types A V I R T U A L E X P E R I E N C E More types… • One of:X y: Requires you to pass N values after it delimited by a colon. Example: oneof:male: female. Will return a random value from that list. • rnd:N, rand:N, rnd:X y, rand:X y : Generate random numbers with a specific range or range cap. • sentence: Generates a sentences. If used as sentence:N, returns N sentences. If used as sentence:X Y, returns a random number of sentences beetween X and Y. • ssn: Generates a random Social Security number. • string: Generates a random string of length 10 by default. You can increase the length by passing it string:length. • tel: Generates a random (American) telephone number. • uuid: Generates a random UUID • url : Generates a random URL with a random protocol • url_http : Generates a random URL with http only protocol • url_https : Generates a random URL with https only protocol • website : Generates a random website with random protocol • website_http : Generates a random website, http only protocol • website_https : Generates a random website, https only protocol • words: Generates a single word. If used as word:N, returns N words. If used as words:X Y, returns a random number of words between X and Y.
  • 42. A V I R T U A L E X P E R I E N C E Mocking Examples
  • 43. A V I R T U A L E X P E R I E N C E Tests Output Utilities Produce output from your tests
  • 44. Let’s Put All Together A V I R T U A L E X P E R I E N C E
  • 45. A V I R T U A L E X P E R I E N C E Create The Integration Test • Let’s use Commandbox to generate the integration tests for us. • coldbox create integration-test handler=main actions=show,create,delete
  • 46. A V I R T U A L E X P E R I E N C E Life Cycle Methods
  • 47. A V I R T U A L E X P E R I E N C E Test suite and specs
  • 48. A V I R T U A L E X P E R I E N C E Let’s create our integration test for the show action
  • 49. A V I R T U A L E X P E R I E N C E Let’s create our integration test for the create action
  • 50. A V I R T U A L E X P E R I E N C E Let’s create our integration test for the delete action
  • 51. A V I R T U A L E X P E R I E N C E Run Your Tests
  • 52. A V I R T U A L E X P E R I E N C E Gracias!
  • 53. Javier Quintero Web Developer Ortus Solutions, Corp A V I R T U A L E X P E R I E N C E @xavikintero @ortussolutions