SlideShare a Scribd company logo
1 of 10
Download to read offline
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 AppsAnup 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 standalonemdfkhan625
 
Az 300 t04a-enu-change-log
Az 300 t04a-enu-change-logAz 300 t04a-enu-change-log
Az 300 t04a-enu-change-logTomas Vileikis
 
Meteor presentation
Meteor presentationMeteor presentation
Meteor presentationscandiweb
 
MUnit run and wait scope
MUnit run and wait scopeMUnit run and wait scope
MUnit run and wait scopeShanky Gupta
 
Create a custom AutoNumber source
Create a custom AutoNumber sourceCreate a custom AutoNumber source
Create a custom AutoNumber sourcePLM 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 GrowthTakashi Someda
 
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in MuleKhasim 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 minutesGennaro 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 ChartsAna-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 appsAna-Maria Mihalceanu
 
Enable Mobile Apps Designer in OBIEE
Enable Mobile Apps Designer in OBIEEEnable Mobile Apps Designer in OBIEE
Enable Mobile Apps Designer in OBIEEOsama 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 presentationServerless User Group Poland
 
Durable functions
Durable functionsDurable functions
Durable functionsToan 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 ServiceRahul Malhotra
 
Introduction to Lightning Testing Service
Introduction to Lightning Testing ServiceIntroduction to Lightning Testing Service
Introduction to Lightning Testing ServiceCloud Analogy
 
AngularJS Unit Test
AngularJS Unit TestAngularJS Unit Test
AngularJS Unit TestChiew Carol
 
Locker services and lightning components
Locker services and lightning componentsLocker services and lightning components
Locker services and lightning componentsCloud Analogy
 
Locker services and lightning components
Locker services and lightning componentsLocker services and lightning components
Locker services and lightning componentsSuraj Tripathi
 
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 TimeJosiah 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 2012Chen-Tien Tsai
 
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptxLWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptxVkrish 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-Appschrisb206 chrisb206
 
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 serversMark 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 guideSudhanshu 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.0Prasad 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 DxCloud 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

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Recently uploaded (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

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