SlideShare a Scribd company logo
Lightning Component Testing with Jasmine
Jasmine is a behaviour-driven
development framework - that is
used for the purpose of testing
Javascript code.
cloud.analogy info@cloudanalogy.com +1(415)830-3899
What are the Advantages ?
Some advantages that Jasmine offers are:
● It is built easy to set up and it is
possible to set up in any scenario
● It has no requirement for DOM
● It has no dependency on any other
Javascript framework
● It helps to write tests in easy steps
because it comes with clean syntax
cloud.analogy info@cloudanalogy.com +1(415)830-3899
cloud.analogy info@cloudanalogy.com +1(415)830-3899
What is lightning Test
Services?
Salesforce has come with a new concept
Lightning Test Services(LTS). LTS is a set
of tools and services - that create test suites
for these Lightning components. It helps in
the validation of the client-side behaviour
of these components.
cloud.analogy info@cloudanalogy.com +1(415)830-3899
You can install LTS in your
Salesforce org in the
following two ways:
● As an unmanaged package
● Install LTS by using a command in
Salesforce Developer Experience(SFDX)
cloud.analogy info@cloudanalogy.com +1(415)830-3899
Steps to follow for installing
Jasmine
We need to follow the following steps for
installing Jasmine and use it for further testing
the Lightning components
1. Installation of Jasmine with the above SFDX
command:
sfdx force:lightning:test:install
cloud.analogy info@cloudanalogy.com +1(415)830-3899
2. Once the installation is completed, you
can start to navigate in your browser - so
as to open the Jasmine test runner page.
sfdx force:org:open -p /c/jasmineTests.app
3. Next, Lightning component is to be
used by Lightning Test Service (LTS).
cloud.analogy info@cloudanalogy.com +1(415)830-3899
4. Now we need to create a Javascript file
containing Jasmine test method and upload it
as a static resource.
5. This static resource then gets uploaded in
Salesforce named as JasmineTestDatatable.
The reference to this app has to be added to the
static resource in JasmineTests.app.
cloud.analogy info@cloudanalogy.com +1(415)830-3899
6. Finally,
the Jasmine Test Runner is opened with the
following URL.
https://<YourDomain>.lightning.force.com/c/jasm
ineTests.app.
This will show the output of the testing in the
form of which test passed and which of the tests
failed. It also displays the pass and fail
percentages.
cloud.analogy info@cloudanalogy.com +1(415)830-3899
7. Also the SFDX commands can be used to
create a Lightning test with a basic template,
by using the following commands:
Sfdx:force:lightning:test:create
Thank You
cloud.analogy info@cloudanalogy.com +1(415)830-3899

More Related Content

What's hot

10 commandments for writing spiffy Lightning Apps
10 commandments for writing spiffy Lightning Apps10 commandments for writing spiffy Lightning Apps
10 commandments for writing spiffy Lightning Apps
Anup Jadhav
 
Is File Load Taking Too Long?
Is File Load Taking Too Long? Is File Load Taking Too Long?
Is File Load Taking Too Long?
PLM Mechanic .
 
Selenium Automation Framework (SAF).
Selenium Automation Framework (SAF).Selenium Automation Framework (SAF).
Selenium Automation Framework (SAF).
Mindtree Ltd.
 
"Building a Production-Grade Serverless Deployment" - Eoin Shanaghy, CTO, fo...
"Building a Production-Grade Serverless Deployment"  - Eoin Shanaghy, CTO, fo..."Building a Production-Grade Serverless Deployment"  - Eoin Shanaghy, CTO, fo...
"Building a Production-Grade Serverless Deployment" - Eoin Shanaghy, CTO, fo...
LCloud
 
Deploying and running mule standalone
Deploying and running mule standaloneDeploying and running mule standalone
Deploying and running mule standalone
mdfkhan625
 
Az 300 t04a-enu-change-log
Az 300 t04a-enu-change-logAz 300 t04a-enu-change-log
Az 300 t04a-enu-change-log
Tomas Vileikis
 
Meteor presentation
Meteor presentationMeteor presentation
Meteor presentation
scandiweb
 
MUnit run and wait scope
MUnit run and wait scopeMUnit run and wait scope
MUnit run and wait scope
Shanky Gupta
 
Create a custom AutoNumber source
Create a custom AutoNumber sourceCreate a custom AutoNumber source
Create a custom AutoNumber source
PLM Mechanic .
 
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,..."Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
LCloud
 
Service Configuration Management for Rapid Growth
Service Configuration Management for Rapid GrowthService Configuration Management for Rapid Growth
Service Configuration Management for Rapid Growth
Takashi Someda
 
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in Mule
Khasim Saheb
 
Mule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutesMule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutes
Gennaro Spagnoli
 
The automation challenge: Kubernetes Operators vs Helm Charts
The automation challenge: Kubernetes Operators vs Helm ChartsThe automation challenge: Kubernetes Operators vs Helm Charts
The automation challenge: Kubernetes Operators vs Helm Charts
Ana-Maria Mihalceanu
 
Presentation_Protractor
Presentation_ProtractorPresentation_Protractor
Presentation_ProtractorUmesh Randhe
 
Kubernetes and the 12 factor cloud apps
Kubernetes and the 12 factor cloud appsKubernetes and the 12 factor cloud apps
Kubernetes and the 12 factor cloud apps
Ana-Maria Mihalceanu
 
Maven and ANT
Maven and ANTMaven and ANT
Maven and ANT
Sun Technlogies
 
Enable Mobile Apps Designer in OBIEE
Enable Mobile Apps Designer in OBIEEEnable Mobile Apps Designer in OBIEE
Enable Mobile Apps Designer in OBIEE
Osama Mustafa
 
AWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentation
AWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentationAWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentation
AWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentation
Serverless User Group Poland
 
Durable functions
Durable functionsDurable functions
Durable functions
Toan Nguyen
 

What's hot (20)

10 commandments for writing spiffy Lightning Apps
10 commandments for writing spiffy Lightning Apps10 commandments for writing spiffy Lightning Apps
10 commandments for writing spiffy Lightning Apps
 
Is File Load Taking Too Long?
Is File Load Taking Too Long? Is File Load Taking Too Long?
Is File Load Taking Too Long?
 
Selenium Automation Framework (SAF).
Selenium Automation Framework (SAF).Selenium Automation Framework (SAF).
Selenium Automation Framework (SAF).
 
"Building a Production-Grade Serverless Deployment" - Eoin Shanaghy, CTO, fo...
"Building a Production-Grade Serverless Deployment"  - Eoin Shanaghy, CTO, fo..."Building a Production-Grade Serverless Deployment"  - Eoin Shanaghy, CTO, fo...
"Building a Production-Grade Serverless Deployment" - Eoin Shanaghy, CTO, fo...
 
Deploying and running mule standalone
Deploying and running mule standaloneDeploying and running mule standalone
Deploying and running mule standalone
 
Az 300 t04a-enu-change-log
Az 300 t04a-enu-change-logAz 300 t04a-enu-change-log
Az 300 t04a-enu-change-log
 
Meteor presentation
Meteor presentationMeteor presentation
Meteor presentation
 
MUnit run and wait scope
MUnit run and wait scopeMUnit run and wait scope
MUnit run and wait scope
 
Create a custom AutoNumber source
Create a custom AutoNumber sourceCreate a custom AutoNumber source
Create a custom AutoNumber source
 
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,..."Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
 
Service Configuration Management for Rapid Growth
Service Configuration Management for Rapid GrowthService Configuration Management for Rapid Growth
Service Configuration Management for Rapid Growth
 
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in Mule
 
Mule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutesMule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutes
 
The automation challenge: Kubernetes Operators vs Helm Charts
The automation challenge: Kubernetes Operators vs Helm ChartsThe automation challenge: Kubernetes Operators vs Helm Charts
The automation challenge: Kubernetes Operators vs Helm Charts
 
Presentation_Protractor
Presentation_ProtractorPresentation_Protractor
Presentation_Protractor
 
Kubernetes and the 12 factor cloud apps
Kubernetes and the 12 factor cloud appsKubernetes and the 12 factor cloud apps
Kubernetes and the 12 factor cloud apps
 
Maven and ANT
Maven and ANTMaven and ANT
Maven and ANT
 
Enable Mobile Apps Designer in OBIEE
Enable Mobile Apps Designer in OBIEEEnable Mobile Apps Designer in OBIEE
Enable Mobile Apps Designer in OBIEE
 
AWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentation
AWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentationAWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentation
AWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentation
 
Durable functions
Durable functionsDurable functions
Durable functions
 

Similar to Lightning component testing with jasmine

Lightning Testing Service
Lightning Testing ServiceLightning Testing Service
Lightning Testing Service
Rahul Malhotra
 
Introduction to Lightning Testing Service
Introduction to Lightning Testing ServiceIntroduction to Lightning Testing Service
Introduction to Lightning Testing Service
Cloud Analogy
 
AngularJS Unit Test
AngularJS Unit TestAngularJS Unit Test
AngularJS Unit Test
Chiew Carol
 
Locker services and lightning components
Locker services and lightning componentsLocker services and lightning components
Locker services and lightning components
Suraj Tripathi
 
Locker services and lightning components
Locker services and lightning componentsLocker services and lightning components
Locker services and lightning components
Cloud Analogy
 
How to improve the performance of Salesforce Lightning Components?
How to improve the performance of Salesforce Lightning Components?How to improve the performance of Salesforce Lightning Components?
How to improve the performance of Salesforce Lightning Components?
Cloud Analogy
 
Turbocharge Your Automation Framework to Shorten Regression Execution Time
Turbocharge Your Automation Framework to Shorten Regression Execution TimeTurbocharge Your Automation Framework to Shorten Regression Execution Time
Turbocharge Your Automation Framework to Shorten Regression Execution Time
Josiah Renaudin
 
How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012
Chen-Tien Tsai
 
Qa process
Qa processQa process
Qa process
Aila Bogasieru
 
Qa process
Qa processQa process
Qa process
Aila Bogasieru
 
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptxLWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
Vkrish Peru
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
chrisb206 chrisb206
 
Installation of Silk Test Framework
Installation of Silk Test FrameworkInstallation of Silk Test Framework
Installation of Silk Test Framework
Burak AVCI, MEM, PSM I®
 
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)
Yan Cui
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
Mark Myers
 
Web application penetration testing lab setup guide
Web application penetration testing lab setup guideWeb application penetration testing lab setup guide
Web application penetration testing lab setup guide
Sudhanshu Chauhan
 
Openstack Cloud Management and Automation Using Red Hat Cloudforms 4.0
Openstack Cloud  Management and Automation Using Red Hat Cloudforms 4.0Openstack Cloud  Management and Automation Using Red Hat Cloudforms 4.0
Openstack Cloud Management and Automation Using Red Hat Cloudforms 4.0
Prasad Mukhedkar
 
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)
Yan Cui
 
Introduction to salesforce_DX
Introduction to salesforce_DXIntroduction to salesforce_DX
Introduction to salesforce_DX
ShashankAggarwal32
 
Introduction to Salesforce Dx
Introduction to Salesforce DxIntroduction to Salesforce Dx
Introduction to Salesforce Dx
Cloud Analogy
 

Similar to Lightning component testing with jasmine (20)

Lightning Testing Service
Lightning Testing ServiceLightning Testing Service
Lightning Testing Service
 
Introduction to Lightning Testing Service
Introduction to Lightning Testing ServiceIntroduction to Lightning Testing Service
Introduction to Lightning Testing Service
 
AngularJS Unit Test
AngularJS Unit TestAngularJS Unit Test
AngularJS Unit Test
 
Locker services and lightning components
Locker services and lightning componentsLocker services and lightning components
Locker services and lightning components
 
Locker services and lightning components
Locker services and lightning componentsLocker services and lightning components
Locker services and lightning components
 
How to improve the performance of Salesforce Lightning Components?
How to improve the performance of Salesforce Lightning Components?How to improve the performance of Salesforce Lightning Components?
How to improve the performance of Salesforce Lightning Components?
 
Turbocharge Your Automation Framework to Shorten Regression Execution Time
Turbocharge Your Automation Framework to Shorten Regression Execution TimeTurbocharge Your Automation Framework to Shorten Regression Execution Time
Turbocharge Your Automation Framework to Shorten Regression Execution Time
 
How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012
 
Qa process
Qa processQa process
Qa process
 
Qa process
Qa processQa process
Qa process
 
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptxLWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
 
Installation of Silk Test Framework
Installation of Silk Test FrameworkInstallation of Silk Test Framework
Installation of Silk Test Framework
 
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
 
Web application penetration testing lab setup guide
Web application penetration testing lab setup guideWeb application penetration testing lab setup guide
Web application penetration testing lab setup guide
 
Openstack Cloud Management and Automation Using Red Hat Cloudforms 4.0
Openstack Cloud  Management and Automation Using Red Hat Cloudforms 4.0Openstack Cloud  Management and Automation Using Red Hat Cloudforms 4.0
Openstack Cloud Management and Automation Using Red Hat Cloudforms 4.0
 
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)
 
Introduction to salesforce_DX
Introduction to salesforce_DXIntroduction to salesforce_DX
Introduction to salesforce_DX
 
Introduction to Salesforce Dx
Introduction to Salesforce DxIntroduction to Salesforce Dx
Introduction to Salesforce Dx
 

Recently uploaded

Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 

Recently uploaded (20)

Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 

Lightning component testing with jasmine

  • 1. Lightning Component Testing with Jasmine Jasmine is a behaviour-driven development framework - that is used for the purpose of testing Javascript code. cloud.analogy info@cloudanalogy.com +1(415)830-3899
  • 2. What are the Advantages ? Some advantages that Jasmine offers are: ● It is built easy to set up and it is possible to set up in any scenario ● It has no requirement for DOM ● It has no dependency on any other Javascript framework ● It helps to write tests in easy steps because it comes with clean syntax cloud.analogy info@cloudanalogy.com +1(415)830-3899
  • 3. cloud.analogy info@cloudanalogy.com +1(415)830-3899 What is lightning Test Services? Salesforce has come with a new concept Lightning Test Services(LTS). LTS is a set of tools and services - that create test suites for these Lightning components. It helps in the validation of the client-side behaviour of these components.
  • 4. cloud.analogy info@cloudanalogy.com +1(415)830-3899 You can install LTS in your Salesforce org in the following two ways: ● As an unmanaged package ● Install LTS by using a command in Salesforce Developer Experience(SFDX)
  • 5. cloud.analogy info@cloudanalogy.com +1(415)830-3899 Steps to follow for installing Jasmine We need to follow the following steps for installing Jasmine and use it for further testing the Lightning components 1. Installation of Jasmine with the above SFDX command: sfdx force:lightning:test:install
  • 6. cloud.analogy info@cloudanalogy.com +1(415)830-3899 2. Once the installation is completed, you can start to navigate in your browser - so as to open the Jasmine test runner page. sfdx force:org:open -p /c/jasmineTests.app 3. Next, Lightning component is to be used by Lightning Test Service (LTS).
  • 7. cloud.analogy info@cloudanalogy.com +1(415)830-3899 4. Now we need to create a Javascript file containing Jasmine test method and upload it as a static resource. 5. This static resource then gets uploaded in Salesforce named as JasmineTestDatatable. The reference to this app has to be added to the static resource in JasmineTests.app.
  • 8. cloud.analogy info@cloudanalogy.com +1(415)830-3899 6. Finally, the Jasmine Test Runner is opened with the following URL. https://<YourDomain>.lightning.force.com/c/jasm ineTests.app. This will show the output of the testing in the form of which test passed and which of the tests failed. It also displays the pass and fail percentages.
  • 9. cloud.analogy info@cloudanalogy.com +1(415)830-3899 7. Also the SFDX commands can be used to create a Lightning test with a basic template, by using the following commands: Sfdx:force:lightning:test:create