SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Downloaden Sie, um offline zu lesen
Shruti Baranwal
Parul Khurana
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
#*** Set the base URL for your Magento instance ***#
MAGENTO_BASE_URL=http://example.com/M2root/
#*** Set the Admin Username and Password for your Magento instance ***#
MAGENTO_BACKEND_NAME=admin
MAGENTO_ADMIN_USERNAME=admin
MAGENTO_ADMIN_PASSWORD=admin123
#*** Uncomment these properties to set up a dev environment with symlinked
projects ***#
MODULE_WHITELIST=Magento_OnePageCheckout
<page name="AdminOpcConfigPage" url="/admin/system_config/edit/section/opc/"
area="admin" module="Magento_OnePageCheckout">
<section name="AdminOpcConfigurationSection"/>
</page>
<section name="AdminOpcConfigSection">
<element name="enableopc" type="select"
selector="#opc_general_settings"/>
<element name="submitbutton" type="button" selector="#save"/>
</section>
-----------------------------------------------------------------------------------------------------------------------------
--Elements Console Source Network Performance Memory Application
<select id="opc_general_settings" name="groups[general_settings]"
class="select"
<option value="1" selected="selected">Yes</option>
<option value="0">No</option>
</select>
<entity name="AdminOpcConfig">
<data key="enable_opc">1</data>
<data key="config_success_opc">You saved the configuration.</data>
</entity>
-----------------------------------------------------------------------------------------------------------------------------------------------------
Elements Console Source Network Performance Memory Application
<select id="opc_general_settings" name="groups[general_settings]"
class="select"
<option value="1">Yes</option>
<option value="0">No</option>
</select>
<actionGroup name="AdminOpcConfiguration">
<amOnPage url="{{AdminOpcConfigurationPage.url}}"
stepKey="navigateToOpcConfiguration"/>
<selectOption userInput="{{AdminOpcConfiguration.enable_opc}}"
selector="{{AdminOpcConfigurationSection.enableopc}}"
stepKey="enableOpc"/>
<click stepKey="clickSaveConfigButton"
selector="{{AdminOpcConfigurationSection.submitbutton}}"/>
<see stepKey="seeSuccessMessage"
userInput="{{AdminOpcConfiguration.config_success_opc}}"/>
</actionGroup>
<test name="CustomerOpcTest">
<annotations>
<features value="Complete Opc Test" />
<stories value="Will configure, and place order." />
<title value="Admin will save module configuration />
<description value="Admin will save the module configuration />
<severity value="CRITICAL" />
<testCaseId value="WKOPC1-00001" />
</annotations>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin2"/>
<actionGroup ref="AdminOpcConfig" stepKey="configureOpc"/>
</test>
Magento core Test file for customer creation StorefrontCreateCustomerTest.xml
<fillField stepKey="fillFirstName"
userInput="{{CustomerEntityOne.firstname}}"
selector="{{StorefrontCustomerCreateFormSection.firstnameField}}"/>
<fillField stepKey="fillLastName" userInput="{{CustomerEntityOne.lastname}}"
selector="{{StorefrontCustomerCreateFormSection.lastnameField}}"/>
<fillField stepKey="fillEmail" userInput="{{CustomerEntityOne.email}}"
selector="{{StorefrontCustomerCreateFormSection.emailField}}"/>
<fillField stepKey="fillPassword" userInput="{{CustomerEntityOne.password}}"
selector="{{StorefrontCustomerCreateFormSection.passwordField}}"/>
My custom module’s Test file StorefrontCreateCustomerTest.xml
<test name="StorefrontCreateCustomerTest">
<click stepKey="clickBecomeSellerRadioButton"
selector="{{StorefrontCustomerCreateFormSection.becomeSellerRadioButton}}"
before="fillEmail"/>
<fillField stepKey="shopUrl" userInput="{{SellerEntityOne.shopurl}}"
selector="{{StorefrontCustomerCreateFormSection.shopUrlField}}"
after="fillPassword"/>
Start selenium web driver -
Generate tests as PHP classes from XML files-
MFTF Directory to run all the commands-
Run all tests-
Run a Single Test -
Generate Reports-
●
●
●
●
●
1s 913ms
785ms
378 ms
91ms
1s 004ms
57ms
1s 066ms
150ms
137ms
●
●
●
●
MFTF-Webkul Magento Meetup 2018
MFTF-Webkul Magento Meetup 2018

Weitere ähnliche Inhalte

Ähnlich wie MFTF-Webkul Magento Meetup 2018

Private slideshow
Private slideshowPrivate slideshow
Private slideshow
sblackman
 
От экспериментов с инфраструктурой до внедрения в продакшен
От экспериментов с инфраструктурой до внедрения в продакшенОт экспериментов с инфраструктурой до внедрения в продакшен
От экспериментов с инфраструктурой до внедрения в продакшен
Dmitry Makhnev
 
VooDoo Driver
VooDoo DriverVooDoo Driver
VooDoo Driver
Devraj06
 
Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)
Oro Inc.
 

Ähnlich wie MFTF-Webkul Magento Meetup 2018 (20)

Magento Performance Toolkit
Magento Performance ToolkitMagento Performance Toolkit
Magento Performance Toolkit
 
Ece-tools release 2002.1.0
Ece-tools release 2002.1.0Ece-tools release 2002.1.0
Ece-tools release 2002.1.0
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
 
Magento 2 - hands on MeetMagento Romania 2016
Magento 2 -  hands on MeetMagento Romania 2016Magento 2 -  hands on MeetMagento Romania 2016
Magento 2 - hands on MeetMagento Romania 2016
 
Parallelminds.web partdemo
Parallelminds.web partdemoParallelminds.web partdemo
Parallelminds.web partdemo
 
Magento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request FlowMagento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request Flow
 
Makezine
MakezineMakezine
Makezine
 
cracked Seo tools - marketing tools - best seo for internet marketing
cracked Seo tools - marketing tools - best seo for internet marketingcracked Seo tools - marketing tools - best seo for internet marketing
cracked Seo tools - marketing tools - best seo for internet marketing
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016
Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016
Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshow
 
Web Components for Java Developers
Web Components for Java DevelopersWeb Components for Java Developers
Web Components for Java Developers
 
Magento 2 Design Patterns
Magento 2 Design PatternsMagento 2 Design Patterns
Magento 2 Design Patterns
 
PowerCMS X
PowerCMS XPowerCMS X
PowerCMS X
 
Voo doodriver training
Voo doodriver trainingVoo doodriver training
Voo doodriver training
 
«От экспериментов с инфраструктурой до внедрения в продакшен»​
«От экспериментов с инфраструктурой до внедрения в продакшен»​«От экспериментов с инфраструктурой до внедрения в продакшен»​
«От экспериментов с инфраструктурой до внедрения в продакшен»​
 
От экспериментов с инфраструктурой до внедрения в продакшен
От экспериментов с инфраструктурой до внедрения в продакшенОт экспериментов с инфраструктурой до внедрения в продакшен
От экспериментов с инфраструктурой до внедрения в продакшен
 
VooDoo Driver
VooDoo DriverVooDoo Driver
VooDoo Driver
 
Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)
 
10 useful WordPress functions (and maybe more)
10 useful WordPress functions (and maybe more)10 useful WordPress functions (and maybe more)
10 useful WordPress functions (and maybe more)
 

Kürzlich hochgeladen

Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Marc Lester
 

Kürzlich hochgeladen (20)

Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdf
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
 
Abortion Clinic In Polokwane ](+27832195400*)[ 🏥 Safe Abortion Pills in Polok...
Abortion Clinic In Polokwane ](+27832195400*)[ 🏥 Safe Abortion Pills in Polok...Abortion Clinic In Polokwane ](+27832195400*)[ 🏥 Safe Abortion Pills in Polok...
Abortion Clinic In Polokwane ](+27832195400*)[ 🏥 Safe Abortion Pills in Polok...
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
 

MFTF-Webkul Magento Meetup 2018

  • 1.
  • 7. #*** Set the base URL for your Magento instance ***# MAGENTO_BASE_URL=http://example.com/M2root/ #*** Set the Admin Username and Password for your Magento instance ***# MAGENTO_BACKEND_NAME=admin MAGENTO_ADMIN_USERNAME=admin MAGENTO_ADMIN_PASSWORD=admin123 #*** Uncomment these properties to set up a dev environment with symlinked projects ***# MODULE_WHITELIST=Magento_OnePageCheckout
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. <page name="AdminOpcConfigPage" url="/admin/system_config/edit/section/opc/" area="admin" module="Magento_OnePageCheckout"> <section name="AdminOpcConfigurationSection"/> </page>
  • 15. <section name="AdminOpcConfigSection"> <element name="enableopc" type="select" selector="#opc_general_settings"/> <element name="submitbutton" type="button" selector="#save"/> </section> ----------------------------------------------------------------------------------------------------------------------------- --Elements Console Source Network Performance Memory Application <select id="opc_general_settings" name="groups[general_settings]" class="select" <option value="1" selected="selected">Yes</option> <option value="0">No</option> </select>
  • 16. <entity name="AdminOpcConfig"> <data key="enable_opc">1</data> <data key="config_success_opc">You saved the configuration.</data> </entity> ----------------------------------------------------------------------------------------------------------------------------------------------------- Elements Console Source Network Performance Memory Application <select id="opc_general_settings" name="groups[general_settings]" class="select" <option value="1">Yes</option> <option value="0">No</option> </select>
  • 17. <actionGroup name="AdminOpcConfiguration"> <amOnPage url="{{AdminOpcConfigurationPage.url}}" stepKey="navigateToOpcConfiguration"/> <selectOption userInput="{{AdminOpcConfiguration.enable_opc}}" selector="{{AdminOpcConfigurationSection.enableopc}}" stepKey="enableOpc"/> <click stepKey="clickSaveConfigButton" selector="{{AdminOpcConfigurationSection.submitbutton}}"/> <see stepKey="seeSuccessMessage" userInput="{{AdminOpcConfiguration.config_success_opc}}"/> </actionGroup>
  • 18. <test name="CustomerOpcTest"> <annotations> <features value="Complete Opc Test" /> <stories value="Will configure, and place order." /> <title value="Admin will save module configuration /> <description value="Admin will save the module configuration /> <severity value="CRITICAL" /> <testCaseId value="WKOPC1-00001" /> </annotations> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin2"/> <actionGroup ref="AdminOpcConfig" stepKey="configureOpc"/> </test>
  • 19.
  • 20.
  • 21. Magento core Test file for customer creation StorefrontCreateCustomerTest.xml <fillField stepKey="fillFirstName" userInput="{{CustomerEntityOne.firstname}}" selector="{{StorefrontCustomerCreateFormSection.firstnameField}}"/> <fillField stepKey="fillLastName" userInput="{{CustomerEntityOne.lastname}}" selector="{{StorefrontCustomerCreateFormSection.lastnameField}}"/> <fillField stepKey="fillEmail" userInput="{{CustomerEntityOne.email}}" selector="{{StorefrontCustomerCreateFormSection.emailField}}"/> <fillField stepKey="fillPassword" userInput="{{CustomerEntityOne.password}}" selector="{{StorefrontCustomerCreateFormSection.passwordField}}"/>
  • 22. My custom module’s Test file StorefrontCreateCustomerTest.xml <test name="StorefrontCreateCustomerTest"> <click stepKey="clickBecomeSellerRadioButton" selector="{{StorefrontCustomerCreateFormSection.becomeSellerRadioButton}}" before="fillEmail"/> <fillField stepKey="shopUrl" userInput="{{SellerEntityOne.shopurl}}" selector="{{StorefrontCustomerCreateFormSection.shopUrlField}}" after="fillPassword"/>
  • 23. Start selenium web driver - Generate tests as PHP classes from XML files- MFTF Directory to run all the commands- Run all tests- Run a Single Test - Generate Reports-
  • 25. 1s 913ms 785ms 378 ms 91ms 1s 004ms 57ms 1s 066ms 150ms 137ms