Cypress test consists of
describe(): It is is simply a way to group our tests. It takes two arguments, the first is the name of the test group, and the second is a callback function.
it(): We use it for an individual test case. It takes two arguments, a string explaining what the test should do, and a callback function which contains our actual test.
Test Case-->We will Open the page in different view ports
View ports can be found in
First Test case
/// <reference types="cypress" />
context('Window', () => {
beforeEach(() => {
cy.visit('https://bugreaper.blogspot.com')
})
it('open in Mac 15', () => {
// https://on.cypress.io/window
cy.viewport('macbook-15')
cy.screenshot()
cy.wait(200)
})
it('open in Mac 13', () => {
// https://on.cypress.io/window
cy.viewport('macbook-13')
cy.screenshot()
cy.wait(200)
})
it('open in ipad-2', () => {
// https://on.cypress.io/window
cy.viewport('ipad-2')
cy.screenshot()
cy.wait(200)
})
it('open in samsung-s10', () => {
// https://on.cypress.io/window
cy.viewport('samsung-s10')
cy.screenshot()
cy.wait(200)
})
})
Now when you run this In cypress, after successfull run a Screenshot folder would be created and will have all screenshots
Your information related to software testing is really very useful for freshers....Thanks for sharing this informative blog..Keep posting..
ReplyDeleteSoftware Testing Services
Software Testing Company
QA Testing Services
Software Testing Companies
Functional Testing Services
Test Automation Services
Functional Testing Company
Performance Testing Services
Security Testing Services
API Testing Services
i am glad to discover this page : i have to thank you for the time i spent on this especially great reading !! i really liked each part and also bookmarked you for new information on your site.
ReplyDeleteTop QA Companies
Top Automation Testing Companies
Top Mobile App Testing Companies
Top Performance Testing Companies
Top Security Testing Companies
If you need an all-in-one HR solution, Clove HRMS provides a dependable Human Resource Management System with robust Payroll Management Software. It supports accurate payroll cycles, easy tax updates, and transparent payroll reporting. The user-friendly dashboard makes it simple for admins and employees to access important HR information, boosting engagement and reducing administrative overhead.
ReplyDeleteDevstringX Technologies stands out for its comprehensive software testing services in india, helping businesses release stable, defect-free software. Their capability spans functional and non-functional testing, automation frameworks, and CI/CD integration. With strong domain expertise and proactive defect prevention, they enhance product quality while shortening release cycles and boosting user satisfaction.
ReplyDelete