This 2-day training course covers Behavior Driven Development (BDD) and automation testing using the Behat and Mink frameworks. Day 1 includes an overview of BDD, the Behat tool, and the Gherkin language. It demonstrates setting up a Behat project, writing feature files with scenarios, and implementing step definitions. Day 2 focuses on more advanced topics like the Mink library for web testing, configuration options, and best practices for BDD. Attendees will learn how to write automated tests for a website using Behat and execute them on the command line or within a browser. The course is suitable for testers and developers interested in BDD and gaining skills in PHP, Behat, and M
Every test tells a story, but some tell a better story than others. Every test illustrates a specific path through the system to achieve a specific goal, but some paths are clearer than others. Valuable tests are the ones that tell a compelling story.
Come on a journey of discovery to learn how to write such tests, and witness a demonstration of these principles in action, with live coding of Serenity BDD automated tests.
OWASP AppSecEU 2018 – Attacking "Modern" Web TechnologiesFrans Rosén
In this talk, top ranked white-hat hacker Frans Rosén (@fransrosen) will focus on methodologies and results of attacking modern web technologies. He will do a deep-dive in postMessage, how vulnerable configurations in both AWS and Google Cloud allow attackers to take full control of your assets.
Listen to 60 minutes of new hacks, bug bounty stories and learnings that will make you realize that the protocols and policies you believed to be secure are most likely not.
In this session you will learn:
Introduction to Test Automation Framework
What is a Test Automation Framework?
Utility of Test Automation Framework
Sample Automation Test Framework
Types of Automation Frameworks
Data Driven Automation Framework
Keyword Driven Automation Framework
Hybrid Automation Framework
Benefits of Automation Framework Approach
For more information: https://www.mindsmapped.com/courses/quality-assurance/qa-software-testing-training-for-beginners/
Every test tells a story, but some tell a better story than others. Every test illustrates a specific path through the system to achieve a specific goal, but some paths are clearer than others. Valuable tests are the ones that tell a compelling story.
Come on a journey of discovery to learn how to write such tests, and witness a demonstration of these principles in action, with live coding of Serenity BDD automated tests.
OWASP AppSecEU 2018 – Attacking "Modern" Web TechnologiesFrans Rosén
In this talk, top ranked white-hat hacker Frans Rosén (@fransrosen) will focus on methodologies and results of attacking modern web technologies. He will do a deep-dive in postMessage, how vulnerable configurations in both AWS and Google Cloud allow attackers to take full control of your assets.
Listen to 60 minutes of new hacks, bug bounty stories and learnings that will make you realize that the protocols and policies you believed to be secure are most likely not.
In this session you will learn:
Introduction to Test Automation Framework
What is a Test Automation Framework?
Utility of Test Automation Framework
Sample Automation Test Framework
Types of Automation Frameworks
Data Driven Automation Framework
Keyword Driven Automation Framework
Hybrid Automation Framework
Benefits of Automation Framework Approach
For more information: https://www.mindsmapped.com/courses/quality-assurance/qa-software-testing-training-for-beginners/
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...Edureka!
This Edureka Selenium tutorial will give you an introduction to software testing. It talks about the drawbacks of manual testing and reasons why automation testing is the way forward. In this Selenium tutorial, you will also get to learn the different suites of Selenium and what are the features and shortcomings of Selenium as an automation testing tool.
To take a structured course on Selenium, you can check our Selenium training page: https://www.edureka.co/testing-with-selenium-webdriver
What is WebElement in Selenium | Web Elements & Element Locators | EdurekaEdureka!
YouTube Link: https://youtu.be/r149MTf4DfI
(** Selenium Training: https://www.edureka.co/selenium-certification-training **)
This Edureka ‘Web elements in Selenium’ video helps you understand how web element plays a major role in testing an application.
Topics to be covered in this PPT
What are web elements
Different types of web elements
Operations performed on the web elements
Introduction to element locators
Web element Interface - Demo
Selenium playlist: https://goo.gl/NmuzXE
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
This presentation done at DeepSec 2014 focuses on using PowerShell for Client Side attacks. New scripts which are part of the open-source toolkit Nishang were also released. NIshang is toolkit in PowerShell for Penetration Testing
The prime objective of “Online MCQ Quiz application” is to take quiz for any individuals through internet. Multiple choice questions (MCQ) will arrive for user with certain time limit for each quiz. “Online MCQ Quiz application” is an android app for making the competitive job exams easier. This app targets users who preparing for different kinds of government and non-government jobs like BCS (Bangladesh Civil Service), bank jobs etc. Users can read online and saved it for future offline reading. All the study materials are divided into chapters, topics, and subtopics and topic related. User can take exams on various subject and get points for his performance which will determine their rank among all the users. User can also take quiz for preparation before taking exams. Users can also request for a particular topic or a discussion.
Edureka Selenium Interview Questions and Answers Tutorial will help you to prepare yourself for Selenium interviews. Learn about the most important Selenium interview questions and answers and know what will set you apart in the interview process.
Watch the video here to find out elaborate answers to these questions: https://www.youtube.com/watch?v=6HS8-u96JJM
¡Introducción a Cypress! - Globant Tech Insiders: Automatización de PruebasGlobant
Puedes encontrar el video de la charla acá: https://youtu.be/Dq48oJfv_3U
Cypress es una herramienta de automatización similar a Selenium, TestCafe entre otros, creada por desarrolladores Front End para desarrolladores Front End. En esta sesión aprenderemos conceptos básicos para que los Test Automation Engineer puedan beneficiarse de ella.
----------------------------------------------------------------------------------------------------------------------
Descúbre todas nuestras oportunidades acá: https://mycareer.globant.com/
Siguenos en:
Facebook: https://www.facebook.com/Globant/
Twitter: https://twitter.com/Globant
Instagram: https://www.instagram.com/globantpics/
Linkedin: https://www.linkedin.com/company/globant/
Microservices Interview Questions and Answers | Microservices Architecture Tr...Edureka!
** Microservices Architecture Training - https://www.edureka.co/microservices-architecture-training **
This Edureka’s Microservices Interview Questions and Answers video (Microservices Blog Series: https://goo.gl/WA5k9u) will help you to prepare for the Microservices Interviews.
Below are the topics covered in this Microservices Interview Questions and Answers Tutorial:
1) Basic Microservices Interview Questions
2) Microservices Architecture Interview Questions
3) Spring Boot Interview Questions
4) Continuous Deployment Interview Questions
5) Continuous Monitoring Interview Questions
Talk Venue: BSides Tampa 2020
Speakers: Mike Felch & Joff Thyer
This talk will focus on the many different ways that a penetration tester, or Red Teamer can leverage the Python programming language during offensive operations. Python is a rich and powerful programming language which above all else allows a competent developer to very quickly write new tools that might start as a Proof of Concept, but soon become an invaluable addition to the Red Teamer's tool-belt. Having the skills to both generate new tools, and modify existing tools on the fly is critically important to agility during testing engagement. Everything from utility processing of data, network protocol, API interaction, and exploit development can be rapidly developed due to the high functionality level and intuitive nature of Python.
The most massive crime of identity theft in history was perpetrated in 2007 by exploiting an SQL Injection vulnerability. This issue is one of the most common and most serious threats to web application security. In this presentation, you'll see some common myths busted and you'll get a better understanding of defending against SQL injection.
Alter Way's digitalks - Docker : des conteneurs pour tout faire ? ALTER WAY
Docker est un projet Open Source qui automatise le déploiement d’applications dans des conteneurs logiciels virtuels. Déjà utilisé par Google, Red Hat, RackSpace, ebay, Microsoft, Amazon, Docker rencontre un succès mondial et est en passe de révolutionner le marché du cloud et de la virtualisation.
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...Edureka!
This Edureka Selenium tutorial will give you an introduction to software testing. It talks about the drawbacks of manual testing and reasons why automation testing is the way forward. In this Selenium tutorial, you will also get to learn the different suites of Selenium and what are the features and shortcomings of Selenium as an automation testing tool.
To take a structured course on Selenium, you can check our Selenium training page: https://www.edureka.co/testing-with-selenium-webdriver
What is WebElement in Selenium | Web Elements & Element Locators | EdurekaEdureka!
YouTube Link: https://youtu.be/r149MTf4DfI
(** Selenium Training: https://www.edureka.co/selenium-certification-training **)
This Edureka ‘Web elements in Selenium’ video helps you understand how web element plays a major role in testing an application.
Topics to be covered in this PPT
What are web elements
Different types of web elements
Operations performed on the web elements
Introduction to element locators
Web element Interface - Demo
Selenium playlist: https://goo.gl/NmuzXE
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
This presentation done at DeepSec 2014 focuses on using PowerShell for Client Side attacks. New scripts which are part of the open-source toolkit Nishang were also released. NIshang is toolkit in PowerShell for Penetration Testing
The prime objective of “Online MCQ Quiz application” is to take quiz for any individuals through internet. Multiple choice questions (MCQ) will arrive for user with certain time limit for each quiz. “Online MCQ Quiz application” is an android app for making the competitive job exams easier. This app targets users who preparing for different kinds of government and non-government jobs like BCS (Bangladesh Civil Service), bank jobs etc. Users can read online and saved it for future offline reading. All the study materials are divided into chapters, topics, and subtopics and topic related. User can take exams on various subject and get points for his performance which will determine their rank among all the users. User can also take quiz for preparation before taking exams. Users can also request for a particular topic or a discussion.
Edureka Selenium Interview Questions and Answers Tutorial will help you to prepare yourself for Selenium interviews. Learn about the most important Selenium interview questions and answers and know what will set you apart in the interview process.
Watch the video here to find out elaborate answers to these questions: https://www.youtube.com/watch?v=6HS8-u96JJM
¡Introducción a Cypress! - Globant Tech Insiders: Automatización de PruebasGlobant
Puedes encontrar el video de la charla acá: https://youtu.be/Dq48oJfv_3U
Cypress es una herramienta de automatización similar a Selenium, TestCafe entre otros, creada por desarrolladores Front End para desarrolladores Front End. En esta sesión aprenderemos conceptos básicos para que los Test Automation Engineer puedan beneficiarse de ella.
----------------------------------------------------------------------------------------------------------------------
Descúbre todas nuestras oportunidades acá: https://mycareer.globant.com/
Siguenos en:
Facebook: https://www.facebook.com/Globant/
Twitter: https://twitter.com/Globant
Instagram: https://www.instagram.com/globantpics/
Linkedin: https://www.linkedin.com/company/globant/
Microservices Interview Questions and Answers | Microservices Architecture Tr...Edureka!
** Microservices Architecture Training - https://www.edureka.co/microservices-architecture-training **
This Edureka’s Microservices Interview Questions and Answers video (Microservices Blog Series: https://goo.gl/WA5k9u) will help you to prepare for the Microservices Interviews.
Below are the topics covered in this Microservices Interview Questions and Answers Tutorial:
1) Basic Microservices Interview Questions
2) Microservices Architecture Interview Questions
3) Spring Boot Interview Questions
4) Continuous Deployment Interview Questions
5) Continuous Monitoring Interview Questions
Talk Venue: BSides Tampa 2020
Speakers: Mike Felch & Joff Thyer
This talk will focus on the many different ways that a penetration tester, or Red Teamer can leverage the Python programming language during offensive operations. Python is a rich and powerful programming language which above all else allows a competent developer to very quickly write new tools that might start as a Proof of Concept, but soon become an invaluable addition to the Red Teamer's tool-belt. Having the skills to both generate new tools, and modify existing tools on the fly is critically important to agility during testing engagement. Everything from utility processing of data, network protocol, API interaction, and exploit development can be rapidly developed due to the high functionality level and intuitive nature of Python.
The most massive crime of identity theft in history was perpetrated in 2007 by exploiting an SQL Injection vulnerability. This issue is one of the most common and most serious threats to web application security. In this presentation, you'll see some common myths busted and you'll get a better understanding of defending against SQL injection.
Alter Way's digitalks - Docker : des conteneurs pour tout faire ? ALTER WAY
Docker est un projet Open Source qui automatise le déploiement d’applications dans des conteneurs logiciels virtuels. Déjà utilisé par Google, Red Hat, RackSpace, ebay, Microsoft, Amazon, Docker rencontre un succès mondial et est en passe de révolutionner le marché du cloud et de la virtualisation.
I put on my mink and wizard behat (tutorial)xsist10
An indepth dive into using Behat/Mink/Selenium for BDD testing.
* http://behat.org
* http://mink.behat.org/
* http://docs.seleniumhq.org/
In this talk I'll cover:
* why and when to use Behat (and when not)
* Installation and configuration of Behat and Mink
* Building Behat Contexts
* Avoiding data deadlocks and "test user account" syndrome
* Introduction to Selenium and testing JavaScript
* Best practises for writing tests (what to avoid, what to aspire for, writing stories like you mean it, how to get your product owners to write them)
* Common gotchas
Prioritization by value (DevOps, Scrum)Tommy Quitt
In Scrum, DevOps it is important to learn how to prioritize by value. Learn how to do it in this very short presentation.
Agile coaching can help teams to flex the muscle of prioritization and proper backlog grooming.
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...PolarSeven Pty Ltd
Chris Kawchuck has 20 years experience in the Telecom and Service provider industry. He will be demonstrating how easy it is to spin up a Brocade vADC in AWS; enabling serverless architectures using S3 buckets, and accomplish real-time traffic rewrites to get you out of sticky situations.
Learn about:
1. Load balancing and scaling options available on AWS
2. Automating the Brocade vADC spin up using Cloudformation Templates
3. Enabling use of "Serverless" web pages in AWS 4.Taking care of tricky situations using TrafficScript
Implementing any 3rd party Load Balancer from the Amazon AWS Marketplace can be a daunting task. Not only does one have to learn the vendor's specific interface, you also need to perform quite a few administrative tasks to setup front end IPs, back end pools, clustering, and so on.
Brocade has published a CloudFormation Template (CFT) which takes all the hard work out of setting it up and operating. Using DevOps tools and open source scripts, we not only automate the deployment of the Brocade vADC within AWS, but all the configuration you need to administer, cluster, and provision your Load Balancers; including public IPs and your back-end server pools.
We would like you to try it, and take advantage of the powerful feature of the Brocade vADC.
https://github.com/dkalintsev/Brocade/tree/master/vADC/CloudFormation/Templates/Variants-and-experimental/Configured-by-Puppet
* Presented at the Sydney AWS User Group session 1st February 2017
http://www.meetup.com/AWS-Sydney/
Hosted and organised by PolarSeven - http://polarseven.com
View the full video presentation here:
https://youtu.be/rKTG2zjQS6o
Presented by Matt Ray, Manager and Solutions Architect for APJ for Chef. He currently resides in Sydney, Australia after relocating from Austin, Texas.
He podcasts at SoftwareDefinedTalk.com and is @mattray on Twitter, IRC, GitHub and too many Slacks.
This session will provide an overview of the Chef Automate solutions and how they come together on AWS.
Ready to give it a try? Get started with this tutorial.
https://learn.chef.io/tutorials/manage-a-node/opsworks/
You might also be interested in our white paper, "DevOps and the Cloud: Chef and Amazon Web Services." This paper is an introduction to how using DevOps patterns with cloud resources can decrease time to market and reduce costs.
https://pages.chef.io/rs/255-VFB-268/images/devops-and-the-cloud-chef-and-aws.pdf
* Presented at the Sydney AWS User Group session 1st February 2017
http://www.meetup.com/AWS-Sydney/
Hosted and organised by PolarSeven - http://polarseven.com
View the full video presentation here:
https://youtu.be/CD_ptwS8k1w
How to support acceptance testing of web applications with the PHP tool Behat in a BDD manner.
Including an overview of acceptance testing in agile software development in general.
Concluding with the most frequent challenges of using Behat and similar tools in practice.
Tired of having users email you that your web application is broken? Turns out that building reliable web applications is hard and requires a lot of testing. You can write unit tests but quite often these all pass and the application is still broken. Why? Because they test parts of the application in isolation. But for a reliable application we need more. We need to make sure that all parts work together as intended.
Cypress is a great tool to achieve this. It will test you complete web application in the browser and use it like a real user would. In this session Maurice will show you how to use Cypress during development and on the CI server. He will share tips and tricks to make your tests more resilient and more like how an actual end user would behave.
Игорь Фесенко "Direction of C# as a High-Performance Language"Fwdays
There are a lot of upcoming performance changes in .NET. Starting from code generation (JIT, AOT) and optimizations that can be performed by the compiler (inlining, flowgraph & loop analysis, dead code elimination, SIMD, stack allocation and so on). In this talk we will cover some features of C# 7 are going towards making low level optimization.
I will share not only how we can improve performance with the next version of .NET, but how we can do it today using different techniques and tools like Roslyn analyzers, Channels (Push based Streams), System.Slices, System.Buffers and System.Runtime.CompilerServices.Unsafe.
This is about encouraging our audience about known good practices. let them introduced why continuous feature development is essential and why that adds value over following rigid processes.
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum
In this talk, we’ll show you our development process at Infinum. We'll talk about Continuous integration, MVP, Git flow, static code analysis, Unit tests, multi-environment support and a few more.
Tech Mentro is a leading IT Training Center in Noida, Delhi-NCR, which provides Core PHP Training, Advance PHP Training, CMS Training, Smarty,Joomla, Ajax, CAKEPHP Framework Training, 6 Weeks Industrial Training and 6 Months Project Training for engineering students and professionals.
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...Speedment, Inc.
The best code is the one you never need to write. Using code generation and automated builds, you can minimize the risk of human error when developing software, but how do you maintain control over code when large parts of it are handed over to a machine? In this tutorial, you will learn how to use open source software to create and control code automation. You will see how you can generate a completely object-oriented domain model by automatically analyzing your database schemas. Every aspect of the process is transparent and configurable, giving you, as a developer, 100 percent control of the generated code. This will not only increase your productivity but also help you build safer, more maintainable Java applications and is a perfect solution for Microservices.
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...Malin Weiss
The best code is the one you never need to write. Using code generation and automated builds, you can minimize the risk of human error when developing software, but how do you maintain control over code when large parts of it are handed over to a machine? In this tutorial, you will learn how to use open source software to create and control code automation. You will see how you can generate a completely object-oriented domain model by automatically analyzing your database schemas. Every aspect of the process is transparent and configurable, giving you, as a developer, 100 percent control of the generated code. This will not only increase your productivity but also help you build safer, more maintainable Java applications and is a perfect solution for Microservices.
Similar to Behat bdd training (php) course slides pdf (20)
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
2. Who is the training for?
•
Ideal for testers wanting to gain BDD and
automation testing experience
•
Some programming knowledge required but not
essential
•
Testers involved with website testing
•
Testers wanting to gain technical skills
•
PHP programmers and Drupal programmers
2
www.time2test.co.uk
3. High level
•
BDD overview
•
Step Definitions
•
Behat History
•
Context Class
•
PHP Versions
•
Assertions
•
Installation
•
Command Line
•
Quick Usage Reference
•
Gherkin Language
•
Features
•
Mink Web Testing
3
www.time2test.co.uk
4. What will you learn?
•
Behaviour Driven
Development Overview
•
Behat Overview and
configuration
•
Gherkin Language Explained
•
Syntax - Givens, Whens,
Thens, And, But
•
Test Data
•
4
Command Line usage
•
Understand Features,
Scenarios, Step
Definitions
Context Class and
Assertions
•
End to End Behat
examples
•
•
Mink for web testing
www.time2test.co.uk
5. schedule
Day 1
Day 2
•
php primer
•
gherkin
•
behat background
•
case studies
•
mink api
5
www.time2test.co.uk
9. variables
•
All variables lead with $
Integers $int_var = 12345;
•
assignments with =
operator
Doubles $doubles = 3.42
•
•
Boolean TRUE or FALSE
constants
variables don’t need to
be declared
Null $my_var = NULL;
no need to specify the
type e.g. String or int
Strings $string = “This is
some text”;
9
www.time2test.co.uk
10. Constants
•
identifier that can not change
•
UPPERCASE
•
define(“NAME”, value);
•
echo constant(“NAME”);
•
Magic constants - ___LINE___, ___FILE___ e.t.c
10
www.time2test.co.uk
13. Loops
for (initial; condition; increment) { code to be executed; }
while ( condition) { code to be executed; }
do { code to be executed; } while ( condition);
foreach (array as value) { code to be exe; }
break
continue
13
www.time2test.co.uk
14. arrays
•
numeric arrays - numeric index
•
associative array - strings used as index
•
multidimensional array - array of arrays
14
www.time2test.co.uk
15. strings
•
single quotes versus double quotes
•
string concatenation with a .
•
strlen($mystring) function
•
strpos($mystring, $searchstring) function
15
www.time2test.co.uk
16. File Input/Output
•
fopen() - open a file
•
filesize() - file length
•
fread() - read a file
•
fclose() - close a file
16
www.time2test.co.uk
23. class - $this
•
$this - is a special variable and it refers to the same
object i.e itself
23
www.time2test.co.uk
24. objects
•
using new keyword
•
$travel = new Books;
•
call member functions
•
$travel->setTitle(“travel to london”);
•
$travel->setPrice(100);
24
www.time2test.co.uk
25. constructors
•
special functions which are automatically called
whenever an object is created/ initialised
•
__construct() to define a constructor with
arguments
25
www.time2test.co.uk
26. public, private and
protected members
•
public members are accessible insside, outside
and in another the class to which is declared
•
private members are limited to the class its
declared
•
protected members are limited to the class its
declared and extended classes only
26
www.time2test.co.uk
37. What is BDD?
•
human readable stories
•
define business outcomes and drill into features
•
testing framework
•
Extends TDD - test driven development
•
Write a test that fails then watch it pass
37
www.time2test.co.uk
38. Why BDD?
•
Deliver what you client wants
•
Better communications and better collaboration
•
Extends the principles of TDD ( Test Data Driven)
testing.
38
www.time2test.co.uk
39. Behat History
•
Behat is the PHP version of Cucumber
•
created by Konstantin Kudryashov (@everzet)
39
www.time2test.co.uk
40. What does Behat do?
Scenario Step
Given I have a file named “foo”
regex
Given /^I have a file named“([^”$/
Definition
public function iHaveAFileNamed($file{
Do some work
touch($file)
Pass and Fal at each step unless an exception is
thrown
40
www.time2test.co.uk
41. Good BDD
•
practice
•
get into the zone for creating features and
scenarios
•
for web testing - understand the mink api
41
www.time2test.co.uk
48. initialise project
•
$>php bin/behat —init
•
This will create some directories
•
+d features - place your *.feature files here
•
+d features/bootstrap - place bootstrap scripts and static
files here
•
Also will create the file FeatureContext.php
•
+f features/bootstrap/FeatureContext.php - place your
feature related code here
48
www.time2test.co.uk
52. Selenium
•
Download selenium server from seleniumhq
•
run selenium standalone server
•
java -jar selenium-server-standalone-2.38.0.jar
•
Tag your scenario with @javascript annotation
52
www.time2test.co.uk
53. javascript test
Run in a browser that supports javascript
@javascript
53
www.time2test.co.uk
55. implement a new step
execution will conveniently come back with a list of
undefined steps
•
/**
* @Given /^I wait for (d+) seconds$/
*/
public function iWaitForSeconds($arg1)
{
throw new PendingException();
}
55
www.time2test.co.uk
56. new step definition code
// copy & paste at features/bootstrap/FeatureContext.php
!
/**
* @Given /^I wait for (d+) seconds$/
*/
public function iWaitForSeconds($seconds)
{
$this->getSession()->wait($seconds*1000);
}
56
www.time2test.co.uk
58. Define a Feature
•
4 line description
•
a line describes the feature
•
three following lines describe the benefit, the role
and feature itself
58
www.time2test.co.uk
59. Define a Scenario
•
many scenarios per feature
•
three line syntax
•
Given - describe the initial state
•
When - action the user takes
•
And Then - what the user sees after the action
59
www.time2test.co.uk
62. Writing Step Definitions
•
behat matches each statement of a scenario to a
list of regular expression steps
•
Behat helps by creating an outline for undefined
steps
62
www.time2test.co.uk
67. Features Explained
•
features are in a format called Gherkin
•
each feature file consists of a single feature
•
each feature will consist of a list of scenarios
67
www.time2test.co.uk
68. Step Definitions
•
written in php
•
consists of a keyword, regular expression and a
callback
•
the regex is a method argument
68
www.time2test.co.uk
71. Command Line Usage
>>behat —h - help options
>>behat —v version
>>behat —dl - view the step definitions
>>behat —init - setup a features dir and
featurecontext.php file
71
www.time2test.co.uk
83. And, But
•
Use and and but for elegant and natural reading
•
not needed but good practice
83
www.time2test.co.uk
84. Test Data
•
Tables used for injecting data - different from
scenario outlines
•
PyStrings - used for larger text input across many
lines
84
www.time2test.co.uk
88. What is Mink?
•
Standalone library to use PHP to command a
browser
•
API to send commands to Selenium, Goutte,
ZombieJS and more
•
The extension allows for BDD tests to be created
without actually writing any PHP code
88
www.time2test.co.uk
89. Installation
•
Update composer.json to include
•
Mink
•
MinkExtension
•
Goutter adn Selenium2 drivers for Mink
•
Then update the vendor libraries ising
•
$>php composer.phar update
89
www.time2test.co.uk
91. MinkContext Extension
•
Gives us access to the Mink Session to allow us to
send commands to a browser
•
Inheritance of a pre-existing definitions
•
Before extending : we have 4 definitions
•
After extending : there are lots of definitions
•
Try it: $>php bin/behat -dl
91
www.time2test.co.uk