 But the mic's on work before there's no mic Room's just 15 Add AB Who does the LG 15 have with the mic? Yeah, you've got one that's built into the desk That's it Give me a minute Dolcey and Matt is on his way Yeah, this is the ambience of the room It might be good enough We have to go through a chain of problems We're still here for five minutes A couple of minutes Just in case you haven't heard the announcement We're making every session Just come to the pub afterwards The toffee maker in Blacksmith Where there's lots of money from our favourite sponsor Funder For us all to have his drinks Whatever it is Five o'clock, I'll be doing it after this talk It's just three minutes walk Right in the corner Yeah, we'll just see that If that's going to capture it We can have a test of the one I know it's quite a bit But it's going to be fine We'll be down We've been exactly that way Yeah, that's usually fine Don't mind selling you to someone else We'll see you right then You can turn it up on the touchpad If you need to Yeah As long as everybody can hear That's fine This picks up the call I'll invite you now Should we test it in? Hey Please be one here Yeah, you turn that up One two three One two three Can you hear me in the back? Yeah A bit of fever Yeah I think this should be good Thanks Well Good evening everybody And thank you for attending the session I was the last session of the day And I wasn't really expecting a big audience So thank you All awake, all have their coffees Or down with the coffee Thank you So as you know We'll be speaking I just wanted to gauge How I should write the session How many of you are already aware Of the term we had Okay fantastic How many into QA So yeah What And why we had So when we speak about we had It's like the first thing that strikes us is It's open source, it's free Wow, anyone can just get started with we had You just know how to install it With the machine and you can straight away Use it So basically it was It is a PHP testing framework Which is available She was inspired By Ruby's Cucumber project And we had this also called As among the official BDD Or the official Cucumber for PHP And We had When we talk about BDD So BDD Again it is Nothing to do with BDD You're going to drive the development With the behavior of the software You want to identify Or you want to know how How the software should behave From a user's perspective And what the clients want And that's why we say that It validates business use cases And it's More of verification And validation Before knowing that The system is being built in the right way It is really important to know Whether you're holding the right system And that's why BDD comes in the future And We had to promote BDD We'll be talking about Galkin We'll be talking about How do we automate Your test cases Or how do we write Automated scenarios That we call in BDD And also the several extensions That are available in hand So the advantage of these extensions Is that these are ready to use PHP libraries Which you just plug in And And they offer great benefits For example we have Groupal extension available to test your Groupal package scenarios We have Mink extension where you can Automate your scenarios to interact With your website Go ahead with the installation Of the app There are some prerequisites So you need basically a MAM server or a LAM server Depending on the OS you have And you need a system-wide Composer installation Which is preferred actually So for the local installation You just create a room directory Call it anything you can call it We had them all Or you can give it the project's name Start with the composer.json file How many of you have no composer How to use it Okay so You just list all the dependencies That you require in your composer File and you just go ahead With the composer install command We had got a viable file Is a configuration file Wherein you Activate all the extensions That you require for the project So for example we will be talking About the extension in today's session So you will be activating That in your viable file It's basically just a configuration file Which helps you with Many types of settings You can You can create various profiles In your viable file And it really helps you to get rid of All the coding that is required So viable file is just Quick configuration and ready to use features You will have to Initialize your BeHat by the command BeHat space In it And once your BeHat is initialized You will have your Features directly You have the bootstrap directly I will talk about the structure Of BeHat in the coming slides And you can also see The list of predefined step definitions By using the command BeHat space Which will give you a list Of ready to use predefined Step definitions So this is just a sample Composer file that you can use We are majorly Interested so when we talk about Mink what we need is We need the BeHat dependency We need the boot driver We need the browser get the Mink extension So you need to driver because There are some extra dependency That I have used So the BeHat screenshot dependency Is used for capturing Failed steps So whenever any scenario Is failing The screenshot gets captured Then there is one Reporting dependency That I have used Which is BeHat HTML format Just to generate Some fancy reports So this is the Structure of BeHat You have your JSON file You have your vitamin directory You have your features directory So features directory is basically Responsible for loading all your Feature files So as of now you can just see There is a sample file called Test.feature But if you take an e-commerce site For example you might have many Such feature files like Around.feature So all the feature files Recite in your features directory There is a bootstrap directory Which contains a very interesting Feature context.php And that file Actually contains all your Custom step definitions So we will talk about Custom step definitions also So there are two parts There is something called as ready to use Step definitions Of course you have your Vimeo file So this is A sample Vimeo file If you can see we have The way you can activate your Extensions here is Line number 18 So there is a mink extension Which is declared at line number 18 And if you are using Groupal extension you can Activate that extension as well Line number 26 You can also Decide on the browser That you want The default that is going to Be used for mink is the boot Driver which is at line number 20 And in case You have any Ajax related Or JS related steps In your scenarios You can use the Selenium 2 driver There are other drivers available as well But I will use the Selenium 2 driver here So we have been talking About feature files here And feature files is really That we are mostly Interested in So what does a feature file consist of Feature file is written in a Language called Gurkin Which is led by your Cucumber pattern actually And all your feature files Will start with the keyword feature Mentioning what kind of a feature It is so maybe you would say That as a site visitor In order to able to Search through the site I should be able to Type in some terms and search So that would be your feature Background is an optional keyword And background is generally Used for Setting up some kind of test data And or maybe you can say It is a hook that runs Before every scenario in your feature file It just makes The feature file more readable It makes it more cleaner because Whatever steps are Whatever consecutive steps Are common to each scenario in a feature file You actually club them And put it in a background And so that kind of That just runs before every scenario Then you have the main thing Which is scenario scenarios are nothing But actually tests in your V hat So maybe as I was saying the search feature You can have multiple scenarios Like as a guest user When you search through the site There would be another scenario As an authenticated user I should be able to search through the site The third scenario would be When I search through the site I should be able to see Various filter options Like you know a sort by ascending Or sort by high low So you can have multiple such scenarios For search feature All of them need To start with these keywords Which is given when then And you can make Them more readable by Using and and but statements I will go to a sample feature File later Coming to Mink extension I mean what it is doing Mink extension is something that you will use To automate your interaction With the web application So for example If you want to fill in a contact form What would a user do Go to the contact page Fill in all the details In the submit button And all of this can be automated In this particular scenario You can be very well automated Using the Mink extension It's a ready to use extension And it's just a plug-in PHP library Of course So basically So we have these browser emulators Like we have Group and We have Selenium 2 Then we have BrowserKit So what is the specialty Of Mink? There are two kinds of browser emulators One are the headless ones And one are the controlling ones Of course they come with their advantages and disadvantages The headless browser emulators Are like They are fast And They are fast and they can handle JS related steps And And sometimes You need both sort of browser emulators You need the ones Which are like And sometimes you want emulators Which Which are like fast And which open up a physical browser Or something And there are browser emulators Which are faster Than the controlling ones But of course they have the limitation In the Ajax or JS related steps So in such cases what do you do? You do not get stuck with One sort of browser emulator You want a mix of all of this So how does Mink So Mink actually It hides the API differences Between all these browser emulators With the help of Mink drivers So you have a Selenium 2 driver Which will So these Mink drivers They kind of You can just use the Mink drivers You can configure them in your biome file And you can make advantages And you can basically create a rich test Some which would run In a headless mode Some which would run in a browser mode Yeah So If we take this particular Feature file So if you see at line number one That is to tag your feature File with the feature it is actually So if I say that this Is a feature file that I have created For authenticated users So I am just tagging as Authuser And the feature says that As an authenticated user In order to perform various activities I should be able to log into the site So this is So this particular feature file is created Using Mink extension So none of the lines in this feature file Have actually any code written by me So this is something Which is ready to use There is some code Which is like Coming from the Mink context So if you see This is pretty readable enough You say that you are on some blogging page And you fill in These two elements Use an email password With the credentials And the scenario Which actually starts at line number 13 Verify that You are able to log in successfully How will you verify that you have logged in successfully You will be adding Some assertions So line number 14 and 15 are nothing but assertions You are just verifying that You can see your name And you can see the link log out Which is fair enough Which will give an assurity So this is by Purely using Mink extension Using PHP code for it So I will talk about Mink drivers We have many Mink drivers Available if you want to know How they differ What are the advantages and disadvantages You can go to the link I mentioned here Yes and I spoke about execution as well There would be browser based execution There would be headless If you want a faster Test execution go for headless Execution I mean there are Environments where you need to Execute in a particular browser Say Chrome, Firefox or Safari You can execute on those browsers as well So what are profiles And we have Again profile is something Which is quickly configurable in your Vimeo file When do you use profiles It's simple for example If you have multiple environments For each of the projects where I work There is a requirement that As soon as the code deployment is done On test environment All the scenarios need to be executed On the test environment Then there is a UAT environment Where only smoke related scenarios Need to run on UAT environment So basically you just create Different profiles for Test for UAT in your Vimeo file So that you need not go Any extra changes We'll talk about it When I show you the Vimeo file There can be multiple browsers as well So for example You can run your scenarios on Chrome You can run your scenarios on headless Chrome or maybe you can run your scenarios On Phantom GS Or you want to run particular scenarios On Say Chrome or In a headless mode You can create different profiles As per the browser type As well So how does it work So it's going to Overwrite It's going to actually inherit whatever Is there in the default profile available Which starts at line number 2 But it is going to have its own settings As well So here if you see I have created a profile For running tests on headless So What you need to do there is You just need to change the settings for Headless Chrome Just crop the screenshot So below line number 35 and 36 You would see the settings for running All the scenarios on headless Chrome Well you can run selective Scenarios as well Many times you would see that You are designing a scenario And you just want to run That particular scenario To verify whether it's actually working Or functioning or not So You can just tag it as Work in progress currently Since that's the work in progress scenario If it's not completed And You definitely don't want to Have it running On your test suit because it's not complete So you can Exclude that All the work in progress scenarios From your current test suit execution It's a simple configuration In your wire mill file You can also run Tag scenarios like As I mentioned right On every weighted deployment You just want all the smoke scenarios To be run or there is some Change in feature So if there is a slight change in A checkout feature Or all the checkout related scenarios To identify if there are any regression issues So all of this Can be done via Simple configuration and The tag scenarios can be done via Command line Group by execution So that's the example How do you run all the smoke Tag scenarios So that would run all the scenarios Which are tagged as smoke only If you want to run a single scenario You can mention the line number So basically you can just Mention the feature file name And the colon line number That would run only one scenario You can exclude All work in progress scenarios From your test suit execution By configuring it In your wire mill file So if you see line number 567 That would be the configuration To exclude any scenarios From your entire test suit execution So We'll talk slightly about Custom step definitions here So whatever I spoke before About make extension It's very powerful You can get started with automating Your test cases Your scenarios In no time You just need to understand how to use Those ready to use step definitions You just need to understand how to use But We had primarily was not Only for that yes that is a Byproduct that we got out of We had actually Purely promotes BDD And the way it promotes BDD Can be explained very well With the help of this example So you have a client And for instance Any authenticated user Should be able to perform A certain set of activities Say for example We previously wrote a scenario For a similar scenario Verify that you can successfully log in So Actually it would be good If I had a comparison screen shot But What is more readable Is this scenario more readable So what does this scenario say That given I'm on the Drupal Camp London page When I log in using value credentials Then I should be able to see This definitely sounds more readable Than this Right What does this say that Given I'm on user login When I fill in edit name These are just some details Of the attributes of the elements That you are interacting with If you want to promote BDD 100% And if you want to make them 100% readable That is also supported By we had yes that The challenge is And if you really want to challenge yourself And go ahead with programming and all Take this approach And just write some glue code behind it So the glue code behind it Would look something similar to this You can create Custom step definitions These are called custom step definitions Since these are not Directly available So you can write these Custom step definitions And just write the corresponding Glue code So when you say that you are on the Drupal Camp London page So I have just directed it to login And you fill in all the valid credentials So you just fill in all the Details You use the name password in the press Button and you just Verify something So I have just verified that The text is visible And that's it There are some widely used We had extensions There is Drupal extension Which is extremely useful For automating your backend scenarios There is symphony, there is screenshot If you want to go ahead and create A page object model There is a page object extension There is Laramil There are multiple extensions available To test your APIs So you can go ahead with any API extension which puts your name There are some reporting extensions And so on So With headless browser So that would cover Using a profile and a headless browser As well For example, I have created A profile over here called Headless Chrome And so I will be Running a particular Feature or maybe this entire feature file On headless Chrome So I already created A file called demo.feature And it has few scenarios Wherein it is verifying Successful login User can log out It's verifying that user can update His or her account with Multiple business styles I mean with every business style And again user can upload Photo to the account So this is scenario outline Which slightly differs from scenario Scenario outlines Is generally used when You want to perform the same set of actions Over different data So if you see I have Created a scenario outline to ensure That user can update his or her account By selecting All types of Business So how this thing runs is It's going to consider each line From 31 to 35 as a simple scenario And this is how So basically your feature file Looks cleaner Or else how would you Have written this is that you know If you consider this as individual scenarios You would have written it as When I follow edit and I select Drupal customer from this particular Wheel and I press same Next scenario would be when I follow edit And I select digital agency So you would have created Five such scenarios You just created one scenario outline So Okay let's go back with the demonstration So This is how you use profiles So you give the So you say I just say hyphen p Equal to h That is the name of the profile That is created in your yml file Yeah so all these Scenarios now would be executed On headless Chrome With the help of profiling You know that you need your Chrome driver to be running in the background Running here So So if you see We had actually four scenarios But only three have been executed The reason is that we have excluded The work in progress scenario here So that did not work The one that was tagged as work in progress This one Now if you want to run any Scenario on a physical browser So for example if I want to So my default profile is actually Of a Chrome browser So I need not mention any profile as such By default it would pick up So any scenario which is tagged as JavaScript Would run in a physical browser That is the cause We have mentioned that the JavaScript session Would use the selenium to driver And it would open up a Chrome browser So this is how you execute Scenario so if I say Scenario number 30 paid That is the scenario we are interested in Right So that is how you execute your scenarios in a browser too And if you want to run any Tag scenario The command is very simple You just So only the smoke scenarios are there I will thank you You can connect with me via social media And We also have a full day training On Meshway It would be a training on vhat With mink and Drupal extension So if you want some hands on You can attend the workshop as well And if you want to Read more about vhat Or more about how you can Utilize it in your projects Or how you can create a framework You can read our blogs On our website as well And there are some quick references We had A wide support For online available So there is quite some support available On github, on stack overflow The documentation is a bit outdated But if you face any issues You will definitely find the solution online Thanks Thank you So we have Drupal vm as well And We also use BLD So We have our Scenarios running part of Dallas, isn't it? So I found on Drupal vm that if you install Drupal From vhat file composer Then you can get vhat running file If you install From Say, vineris From a title You cannot get vhat You have to run with it You cannot get vhat running I mean, what It starts Complains about About any version mismatch That's why I think it is some sort of version A version mismatch there But it talks about not being able to access Policy code Dynamic Oh, okay Are you talking about Drupal context here? Yeah, okay When you want to execute your Drupal context scenarios on a Remote server I want to ask you Within the vm Yeah That is very much possible That is possible Yeah, I don't know what's going on Yeah, yeah It depends If you install it from the Folder into the side room Whereas if you install it from the Folder is below the Side room It doesn't matter Try and try Okay, yeah, I mean Getting vhat running with CI Might get challenging in few situations But you can get it working I'm sure you can That's what I did immediately Because we have Our vhat scenarios running Almost on all the projects we have It running on some sort of CI So we use Yeah, after it running on bit It's my problem Okay, maybe we can connect Any more questions? So to exclude One tag, you have to use The tilde sign Yeah, you have to use the tilde sign That is kind of do not include That time You can do it via command line So you saw that I ran a command saying Tans at the rate smoke So you can also kind of Say and at the rate tilde And so you can do it By a command line as well But setting up it in Viomil file can be helpful If you want to run on your Test on some kind of CI So it would automatically exclude All the work in progress scenarios So that's the reason you use your Viomil file So this would also exclude Your work in progress scenarios These are my tips Working on sites There are lots of scenarios Lots of features So for instance I work on a site that has We have more than a thousand Scenarios and just running Through all of those networks Between four and five hours Just getting to be So what we do is We tag our scenarios as Smoke I mean I have scenarios running On every build or something For each feature branch For each feature branch So what we do is we have tagged Our scenarios as smoke And on every Whenever VR is generated Only the smoke related scenarios Get executed And we are also coming up with There would be a nightly run And all the scenarios would be executed Only nightly Just to ensure that there is no Irrigation introduced And there is a requirement from the client Where it may have said that For per VR you know The execution should not exceed More than five to seven minutes That is an imitation even we have So you have to be very clear And that should happen in parallel Because you know once you have Is actually you know can get troublesome And that is the reason I mentioned That it is a good practice to tag Your feature file and scenarios As and how you design them So for example if you tag your feature files In the beginning as per the feature It says maybe at the rate search Or maybe at the rate checkout And go on tagging your smoke Scenarios as well Smoke scenarios so You can use the feature Of tags the way you want Tagging and profiling And there is also an extension Available for running your tests in parallel So with the combination of these three Features you can also have Parallel execution in Be Hacker Thank you guys, thank you so much Thank you everyone Three minutes of the road Lots of free drink Thank you So the elements for that They were instead of showing horizontally They flew up vertically By an explorer Can you do like an automated Directive that checks your Like you would So if you have your production Environment that would Call the production environment And then you can run it So we have a rate Which is very good for business I've heard of it but I've never used it before And you also have like Phantom CSS And there is sheen So these supports are available Oh those do support And there is So there is a good feature Available for Phantom CSS Is that wherever you need Some kind of interactive screenshots For example the mile down section Will not be used in London so you log in So there is So there is a password So you can write You can also take screenshots Or such interactive functions So you could also do like Could you do things that Would check to see the In sections of like that There is this tool Germany I know for sure Germany isn't used For sure it's about Reit has a limitation That it runs only on this browser So it won't support I11 But Germany won't support Interesting And you talked about the Drupal library What type of stuff is that Can it check like Your different roles and stuff like that Absolutely yes We would be talking more about that in Drupal It's a full day training So basically it would check scenarios Like you know who are on them And what type of role is available And you can perform a certain set Of activities Are you saying that those are like Pre-populated? We don't need to have any code for it Yeah You can run crawl You can clear cache You just pull that particular In your scenario My team I'm not going into Drupal My team is young So I'm going to see if I can convince somebody Yeah Which company are you from? Kenya You guys are from Canada right? Yeah I remember you were The role of that thing You guys used to be here Yeah There you go You're like the second person in it My name is Kewsh John Are you a test engineer? I work in our support department So I do Right now I'm doing a lot of Romney testing to serve Joe's inspector But I was looking at moving to Because there's so much stuff Like we have stuff where When you're dealing with intranets Or hospitals and stuff You don't want to have that inside So to be able to run the test locally Would be like a lot more And I'm having a lot of problems In cross multiple environments Where especially because of what you had You can do that so easily So I've been looking at Yeah Because I'd like to be able to do this So every time we do a Yes So you have this Yeah But I don't shell That's awesome Thank you Please Thank you Thank you Thank you No video That was the biggest one of their I always Believe was here and I could have done not at all. They said you were brilliant. I came in late, I'm sorry, but I got a really nice picture of Christine Stone. It's my belly, is it really? Not. But you know what, I think my belly might have been visible in more trouble. Hopefully it didn't block anything out. More we need more. The demonstration thing I did last year was like, more go le ja ni chattel ni ha mithi samde ka main. Will you practice for this session? No, this was on the spot. That's very good. But I'm doing it as late as possible. See that's where the I want to go. They need to know how to change. I'm not familiar with that. One bag? We have just one bag. I have to put a zero here, because if I say one or more. Check it. This means the bag you give them. And they put it under the plate. This carry-on bag. Yes, carry-on bag. Is this the only thing? Yes, one for me and one for you. Thank you very much. I'm going to have a session there. Who's going to expose you for a song? No. Are you sure? When it comes to our content, do you know what I'm missing? What if I were to take the articles that would write and come up with different versions? I would give them to you, like I could write the travel and then give it to you. And then you all naturally walk and you make changes and then publish it out. Like, I could start to summarize that for you. That's the deal. It's a lot of work, you know. This and what we were talking about. Can I start here? Sorry? Oh, no, but I don't know. Maybe we're left unattended without a proper line here. We are. It is because you can see people are alive. Political shifts. And then when you leave the discussion and then you run into people who say, oh, we're going to shoot it down anyway. You know, it's like, oh my gosh. I will. I will.