Skip to main content

Posts

Showing posts from December, 2021

API TESTING IN CYPRESS

  Tutorial 10 – API Testing in Cypress Adding the PDF link as the images are not fully loaded: https://docs.google.com/document/d/1WymhdDurkCURxLHceazF3ozGTDtm4bPMr3gDUcXFfBg/edit?usp=sharing What you will Learn : What is API? API Testing in cypress using cy.request() command (GET method) API Testing in cypress using cy.request() command (POST method) What is API (Application Programming Interface) Look at below figure. When you download some application (example Zoho app, on your mobile or desktop) and when you try to signup, it might ask you if you want to Login with your Gmail/Facebook/Twitter credentials. So when you login using any of these apps, you are successfully logged in. Here, Zoho and Facebook/Gmail are different applications, but they communicate eahc other using APIs. So facebook app exposed some of it’s APIs to provide facility to login Zoho. So API is nothing but a resource through which you are getting information from any database, but you don’t have the direct a...

HANDLING WEBTABLES IN CYPRESS

  Tutorial 9 – Handle Webtable in Cypress Adding the PDF link as the images are not fully loaded: https://docs.google.com/document/d/1bmpugirvL5B4msmjJyBNy6Vf7Jc0oxr7sNwbw68tlbk/edit?usp=sharing What you will Learn : Handle HTML WebTable in cypress Pick any value from table and verify the value Pick a value from specific row and column in a table and verify SCENARIO 1: Pick any value from table and verify the value Launch  http://testautomationpractice.blogspot.com/  and come to be page bottom, you would see an HTML table containing data. We would like to pick any value from this table and want to verify the value. So, let us say, we would like to check the value ‘Javascript’ anywhere in the table. This value might be present anywhere in the table. We will begin by inspecting the table Hover the mouse over <table name=”BookTable”> You would see that entire table gets highlighted Next open chropath & click ‘Selectors’ dropdown Select ‘Css Sel..’ from dropdown. In...

PARAMETERIZATION IN CYPRESS

  Tutorial 8 – Parameterization in Cypress Adding the PDF link as the images are not fully loaded: https://docs.google.com/document/d/1jS0DNytAiMntqVN5fhHRjheA_CCPWCtMAaNEoxi6kjw/edit?usp=sharing What you will Learn : Data driven testing using fixtures (parameterization) What is a fixture and what is data driven testing Where do we create a fixture file? Prepare fixture file Automate a simple flow Load the fixture file using ‘before’ hook Parameterize the test and run it What is a fixture & what is ‘Data driven testing’ We should never hard code our test data (example, abc@gmail.com) inside the code. The reason being, if you hard code the test data inside your script & it is being used at 10 places, tomorrow if the test data changes for any reason (example,  abc@gmail.com  changes to abc1@gmail.com), you have to change your code at 10 places. This is not the correct practice. This would make your code error prone & is time consuming too. Instead, we should kee...