SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
5/10/18, 11(03 PM
Page 1 of 15http://localhost:8000/?print-pdf
AUTOMATE YOUR
TESTS
BY LONNIE RAMIREZ
REPO:
HTTPS://GITHUB.COM/LRAMIREZ925/JE
NKINSCFPRESENTATION
5/10/18, 11(03 PM
Page 2 of 15http://localhost:8000/?print-pdf
Code, without tests, is not clean. No
matter how elegant it is, no matter
how readable and accessible, if it hath
not tests, it be unclean.
--Robert C. Martin, Clean Code: A Handbook of Agile So!ware Cra!smanship
5/10/18, 11(03 PM
Page 3 of 15http://localhost:8000/?print-pdf
WHO AM I
From Johnstown, PA (Yes we
flooded ourselves 3 times).
Graduated from UPJ and
currently attending Syracuse
University's Online Masters
Program
Avid adventurer into Scifi and
Anime conventions.
I constantly break everything so I
am always looking for new ways
to find where I broke it.
Twitter: epicureannerd
Email:
epicureannerd@gmail.com
5/10/18, 11(03 PM
Page 4 of 15http://localhost:8000/?print-pdf
5/10/18, 11(03 PM
Page 5 of 15http://localhost:8000/?print-pdf
SOME USEFUL COMMANDS
1. install testbox
- This installs testbox to your app adding the entry to the box.
1. cfconfig import
- Installs your config.... depending on your docker setup may not
1. server start port=8080
- runs your server using default server.json and uses this port.
5/10/18, 11(03 PM
Page 6 of 15http://localhost:8000/?print-pdf
SOME USEFUL COMMANDS
1. testbox run
Runs the default url set in the box.json
parameters
runner=" "
The url to your runner. This is why we set the
port ourselves.
reporter="JUnit"
Reporter type. Using JUnit because jenkins
can use it by default
directory="tests.bundles"
Directory where your rests are.
outputFile="./junitResults.xml"'
File to output the test results to be archived.
http://localhost:8080/tests/runner.cfm
5/10/18, 11(03 PM
Page 7 of 15http://localhost:8000/?print-pdf
5/10/18, 11(03 PM
Page 8 of 15http://localhost:8000/?print-pdf
JENKINS
Jenkins is an open source automation
server written in Java. Jenkins helps
to automate the non-human part of
so!ware development process, with
continuous integration and facilitating
technical aspects of continuous
delivery.
--Wikipedia
5/10/18, 11(03 PM
Page 9 of 15http://localhost:8000/?print-pdf
JENKINS
--https://jenkins.io/doc/book/installing/
docker run 
-u root 
--rm 
-d 
-p 8080:8080 
-p 50000:50000 
-v jenkins-data:/var/jenkins_home 
-v /var/run/docker.sock:/var/run/docker.sock 
jenkinsci/blueocean
5/10/18, 11(03 PM
Page 10 of 15http://localhost:8000/?print-pdf
JENKINS PIPELINE FILE
File name is JenkinsFile though can be changed.
Can be written in Declarative or Scripted, both are
forms of groovy
Declaritive is easier and stricter
Scripted is more flexible and powerful
If you can run via command line then you can run it
in jenkins.
If you can't run via commandline get
CommandBox
5/10/18, 11(03 PM
Page 11 of 15http://localhost:8000/?print-pdf
WHY USE A PIPELINE FILE
Steps for testing are in your repo.
If one branch adds a new testing method or step it
won't break other branches.
Can work with almost any work flow.
For more advanced features you can program in
groovy.
5/10/18, 11(03 PM
Page 12 of 15http://localhost:8000/?print-pdf
BASIC CODE.
pipeline { // Top level required.
agent { // Specifies where the the pipeline will execute.
docker { // Execute the pipeline within a docker image
image 'ortussolutions/commandbox' // Image for docker
args '-u=root'
}
}
stages { // Bulk of the work happens here. Is made up of multiple stage children. Does them in order
stage('Build') { //Different steps in the stages section
steps { //Here is the actions that occur in the stage
echo 'In Build Script. ' //simply output the string
sh 'ls' // Perform command line actions.
sh 'box server start port=8080'
sh 'box cfconfig import myConfig.json'
sh 'box cfconfig import testConfig.json'
sh 'box install'
sh 'box server restart'
}
}
stage('Unit Tests') { //Testing stage. This does not run if previous stages have failed.
steps {
echo 'Running Unit Tests'
sh 'box testbox run runner="http://localhost:8080/tests/runner.cfm" reporter="JUnit" direct
sh 'ls'
junit 'junitResults.xml'
}
}
stage('Deploy') {
steps {
echo 'Deploying'
}
}
}
post { // This always occurs even if something failed.
always {
archiveArtifacts "src/**/*"
5/10/18, 11(03 PM
Page 13 of 15http://localhost:8000/?print-pdf
CFLINT EXAMPLE CODE.
pipeline {
agent {
docker {
image 'ortussolutions/commandbox'
args '-u=root'
}
}
stages {
stage('Build') {
steps {
echo 'In Build Script. '
sh 'box install commandbox-cflint'
sh 'box server start port=8080'
sh 'box cfconfig import myConfig.json'
sh 'box cfconfig import testConfig.json'
sh 'box install'
sh 'box server restart'
}
}
stage('Unit Tests') {
parallel {
stage('Unit Tests') {
steps {
echo 'Running Unit Tests'
sh 'box testbox run runner="http://localhost:8080/tests/runner.cfm" reporte
sh 'ls'
junit 'junitResults.xml'
}
}
stage('runCFLint') {
steps {
sh 'box cflint exitOnError=false --html pattern="**/src/**|**/tests/"'
archiveArtifacts 'cflint-results.html'
}
}
5/10/18, 11(03 PM
Page 14 of 15http://localhost:8000/?print-pdf
CACHE ARTIFACTS EXAMPLE
CODE.
pipeline {
agent {
docker {
image 'ortussolutions/commandbox'
args '''-u=root -v commandBoxArtifacts:/root/.CommandBox/artifacts'''
}
}
stages {
stage('Build') {
steps {
echo 'In Build Script. '
sh 'ls'
sh 'box server start port=8080'
sh 'box cfconfig import myConfig.json'
sh 'box cfconfig import testConfig.json'
sh 'box install'
sh 'box server restart'
}
}
stage('Unit Tests') {
steps {
echo 'Running Unit Tests'
sh 'box testbox run runner="http://localhost:8080/tests/runner.cfm" reporter="JUnit" direct
sh 'ls'
junit 'junitResults.xml'
}
}
stage('Deploy') {
steps {
5/10/18, 11(03 PM
Page 15 of 15http://localhost:8000/?print-pdf
IT IS THAT SIMPLE
Twitter: epicureannerd
Email:
epicureannerd@gmail.com

Mais conteúdo relacionado

Semelhante a Into The Box 2018 Automate Your Test

Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)
Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)
Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)Maxim Guenis
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidenceJohn Congdon
 
Intelligent Software Development, Courtesy of Intelligent Software
Intelligent Software Development, Courtesy of Intelligent SoftwareIntelligent Software Development, Courtesy of Intelligent Software
Intelligent Software Development, Courtesy of Intelligent SoftwareTechWell
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierCarlos Sanchez
 
Trust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersTrust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersNan Liu
 
Journey through the ML model deployment to production by Stanko Kuveljic
Journey through the ML model deployment to production by Stanko KuveljicJourney through the ML model deployment to production by Stanko Kuveljic
Journey through the ML model deployment to production by Stanko KuveljicSmartCat
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in RustInfluxData
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011bobmcwhirter
 
Node.js: CAMTA Presentation
Node.js: CAMTA PresentationNode.js: CAMTA Presentation
Node.js: CAMTA PresentationRob Tweed
 
/etc/rc.d配下とかのリーディング勉強会
/etc/rc.d配下とかのリーディング勉強会/etc/rc.d配下とかのリーディング勉強会
/etc/rc.d配下とかのリーディング勉強会Naoya Nakazawa
 
No Callbacks, No Threads - RailsConf 2010
No Callbacks, No Threads - RailsConf 2010No Callbacks, No Threads - RailsConf 2010
No Callbacks, No Threads - RailsConf 2010Ilya Grigorik
 
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)ZFConf Conference
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Puppet
 
Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!cloudbring
 
An Easy way to build a server cluster without top of rack switches (MEMO)
An Easy way to build a server cluster without top of rack switches (MEMO)An Easy way to build a server cluster without top of rack switches (MEMO)
An Easy way to build a server cluster without top of rack switches (MEMO)Naoto MATSUMOTO
 
Journey through the ML model deployment to production @DSC5
Journey through the ML model deployment to production @DSC5Journey through the ML model deployment to production @DSC5
Journey through the ML model deployment to production @DSC5SmartCat
 

Semelhante a Into The Box 2018 Automate Your Test (20)

Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)
Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)
Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
Auto Build
Auto BuildAuto Build
Auto Build
 
Fun with Ruby and Cocoa
Fun with Ruby and CocoaFun with Ruby and Cocoa
Fun with Ruby and Cocoa
 
Intelligent Software Development, Courtesy of Intelligent Software
Intelligent Software Development, Courtesy of Intelligent SoftwareIntelligent Software Development, Courtesy of Intelligent Software
Intelligent Software Development, Courtesy of Intelligent Software
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next Frontier
 
Trust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersTrust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker Containers
 
Journey through the ML model deployment to production by Stanko Kuveljic
Journey through the ML model deployment to production by Stanko KuveljicJourney through the ML model deployment to production by Stanko Kuveljic
Journey through the ML model deployment to production by Stanko Kuveljic
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in Rust
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011
 
Node.js: CAMTA Presentation
Node.js: CAMTA PresentationNode.js: CAMTA Presentation
Node.js: CAMTA Presentation
 
/etc/rc.d配下とかのリーディング勉強会
/etc/rc.d配下とかのリーディング勉強会/etc/rc.d配下とかのリーディング勉強会
/etc/rc.d配下とかのリーディング勉強会
 
Being agile with modern Java
Being agile with modern JavaBeing agile with modern Java
Being agile with modern Java
 
No Callbacks, No Threads - RailsConf 2010
No Callbacks, No Threads - RailsConf 2010No Callbacks, No Threads - RailsConf 2010
No Callbacks, No Threads - RailsConf 2010
 
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
 
Transforming WebSockets
Transforming WebSocketsTransforming WebSockets
Transforming WebSockets
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)
 
Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!
 
An Easy way to build a server cluster without top of rack switches (MEMO)
An Easy way to build a server cluster without top of rack switches (MEMO)An Easy way to build a server cluster without top of rack switches (MEMO)
An Easy way to build a server cluster without top of rack switches (MEMO)
 
Journey through the ML model deployment to production @DSC5
Journey through the ML model deployment to production @DSC5Journey through the ML model deployment to production @DSC5
Journey through the ML model deployment to production @DSC5
 

Mais de Ortus Solutions, Corp

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionOrtus Solutions, Corp
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Ortus Solutions, Corp
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfOrtus Solutions, Corp
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfOrtus 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_.pdfOrtus Solutions, Corp
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfOrtus Solutions, Corp
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfOrtus Solutions, Corp
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfOrtus Solutions, Corp
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfOrtus Solutions, Corp
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfOrtus Solutions, Corp
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfOrtus Solutions, Corp
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfOrtus Solutions, Corp
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfOrtus 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.pdfOrtus Solutions, Corp
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfOrtus Solutions, Corp
 

Mais de Ortus Solutions, Corp (20)

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Ortus Government.pdf
Ortus Government.pdfOrtus Government.pdf
Ortus Government.pdf
 
Luis Majano The Battlefield ORM
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORM
 
Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusion
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
 
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
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
 
ITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdfITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdf
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
 
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
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdf
 

Último

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 

Último (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

Into The Box 2018 Automate Your Test

  • 1. 5/10/18, 11(03 PM Page 1 of 15http://localhost:8000/?print-pdf AUTOMATE YOUR TESTS BY LONNIE RAMIREZ REPO: HTTPS://GITHUB.COM/LRAMIREZ925/JE NKINSCFPRESENTATION
  • 2. 5/10/18, 11(03 PM Page 2 of 15http://localhost:8000/?print-pdf Code, without tests, is not clean. No matter how elegant it is, no matter how readable and accessible, if it hath not tests, it be unclean. --Robert C. Martin, Clean Code: A Handbook of Agile So!ware Cra!smanship
  • 3. 5/10/18, 11(03 PM Page 3 of 15http://localhost:8000/?print-pdf WHO AM I From Johnstown, PA (Yes we flooded ourselves 3 times). Graduated from UPJ and currently attending Syracuse University's Online Masters Program Avid adventurer into Scifi and Anime conventions. I constantly break everything so I am always looking for new ways to find where I broke it. Twitter: epicureannerd Email: epicureannerd@gmail.com
  • 4. 5/10/18, 11(03 PM Page 4 of 15http://localhost:8000/?print-pdf
  • 5. 5/10/18, 11(03 PM Page 5 of 15http://localhost:8000/?print-pdf SOME USEFUL COMMANDS 1. install testbox - This installs testbox to your app adding the entry to the box. 1. cfconfig import - Installs your config.... depending on your docker setup may not 1. server start port=8080 - runs your server using default server.json and uses this port.
  • 6. 5/10/18, 11(03 PM Page 6 of 15http://localhost:8000/?print-pdf SOME USEFUL COMMANDS 1. testbox run Runs the default url set in the box.json parameters runner=" " The url to your runner. This is why we set the port ourselves. reporter="JUnit" Reporter type. Using JUnit because jenkins can use it by default directory="tests.bundles" Directory where your rests are. outputFile="./junitResults.xml"' File to output the test results to be archived. http://localhost:8080/tests/runner.cfm
  • 7. 5/10/18, 11(03 PM Page 7 of 15http://localhost:8000/?print-pdf
  • 8. 5/10/18, 11(03 PM Page 8 of 15http://localhost:8000/?print-pdf JENKINS Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of so!ware development process, with continuous integration and facilitating technical aspects of continuous delivery. --Wikipedia
  • 9. 5/10/18, 11(03 PM Page 9 of 15http://localhost:8000/?print-pdf JENKINS --https://jenkins.io/doc/book/installing/ docker run -u root --rm -d -p 8080:8080 -p 50000:50000 -v jenkins-data:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock jenkinsci/blueocean
  • 10. 5/10/18, 11(03 PM Page 10 of 15http://localhost:8000/?print-pdf JENKINS PIPELINE FILE File name is JenkinsFile though can be changed. Can be written in Declarative or Scripted, both are forms of groovy Declaritive is easier and stricter Scripted is more flexible and powerful If you can run via command line then you can run it in jenkins. If you can't run via commandline get CommandBox
  • 11. 5/10/18, 11(03 PM Page 11 of 15http://localhost:8000/?print-pdf WHY USE A PIPELINE FILE Steps for testing are in your repo. If one branch adds a new testing method or step it won't break other branches. Can work with almost any work flow. For more advanced features you can program in groovy.
  • 12. 5/10/18, 11(03 PM Page 12 of 15http://localhost:8000/?print-pdf BASIC CODE. pipeline { // Top level required. agent { // Specifies where the the pipeline will execute. docker { // Execute the pipeline within a docker image image 'ortussolutions/commandbox' // Image for docker args '-u=root' } } stages { // Bulk of the work happens here. Is made up of multiple stage children. Does them in order stage('Build') { //Different steps in the stages section steps { //Here is the actions that occur in the stage echo 'In Build Script. ' //simply output the string sh 'ls' // Perform command line actions. sh 'box server start port=8080' sh 'box cfconfig import myConfig.json' sh 'box cfconfig import testConfig.json' sh 'box install' sh 'box server restart' } } stage('Unit Tests') { //Testing stage. This does not run if previous stages have failed. steps { echo 'Running Unit Tests' sh 'box testbox run runner="http://localhost:8080/tests/runner.cfm" reporter="JUnit" direct sh 'ls' junit 'junitResults.xml' } } stage('Deploy') { steps { echo 'Deploying' } } } post { // This always occurs even if something failed. always { archiveArtifacts "src/**/*"
  • 13. 5/10/18, 11(03 PM Page 13 of 15http://localhost:8000/?print-pdf CFLINT EXAMPLE CODE. pipeline { agent { docker { image 'ortussolutions/commandbox' args '-u=root' } } stages { stage('Build') { steps { echo 'In Build Script. ' sh 'box install commandbox-cflint' sh 'box server start port=8080' sh 'box cfconfig import myConfig.json' sh 'box cfconfig import testConfig.json' sh 'box install' sh 'box server restart' } } stage('Unit Tests') { parallel { stage('Unit Tests') { steps { echo 'Running Unit Tests' sh 'box testbox run runner="http://localhost:8080/tests/runner.cfm" reporte sh 'ls' junit 'junitResults.xml' } } stage('runCFLint') { steps { sh 'box cflint exitOnError=false --html pattern="**/src/**|**/tests/"' archiveArtifacts 'cflint-results.html' } }
  • 14. 5/10/18, 11(03 PM Page 14 of 15http://localhost:8000/?print-pdf CACHE ARTIFACTS EXAMPLE CODE. pipeline { agent { docker { image 'ortussolutions/commandbox' args '''-u=root -v commandBoxArtifacts:/root/.CommandBox/artifacts''' } } stages { stage('Build') { steps { echo 'In Build Script. ' sh 'ls' sh 'box server start port=8080' sh 'box cfconfig import myConfig.json' sh 'box cfconfig import testConfig.json' sh 'box install' sh 'box server restart' } } stage('Unit Tests') { steps { echo 'Running Unit Tests' sh 'box testbox run runner="http://localhost:8080/tests/runner.cfm" reporter="JUnit" direct sh 'ls' junit 'junitResults.xml' } } stage('Deploy') { steps {
  • 15. 5/10/18, 11(03 PM Page 15 of 15http://localhost:8000/?print-pdf IT IS THAT SIMPLE Twitter: epicureannerd Email: epicureannerd@gmail.com