Cypress Full Syllabus
Cypress Full Syllabus
Automation
Learning
CONTENT
S
0 Java Script
1
0 Node
JS
2
0 Why Type
Script?
3
0 Cypres
s
4
0 GI
PART
01
Java Script
JavaScript is a dynamic programming language that's used for web
development.
Whyjs
•
•
?
JavaScript is the world's most popular programming language.
W3School
W3Schools is a freemium educational website for
learning coding online.
https://www.w3schools.com/js/
JS topics to be covered
Ref Link :
https://www.w3schools.com/js/
PART
02
Node
JS
Node.js (Node) is an open source, cross-platform runtime environment
for executing JavaScript code.
❑ Node JS comes with speed and gives users the platform they
need to execute real-time apps with no wait time.
⮚ TypeScript Code is converted into Plain JavaScript Code: TypeScript code can’t
be natively interpreted by browsers. So if the code was written in TypeScript, it
gets compiled and converted into JavaScript. This process is known as Trans-
piled. With the help of JavaScript code, browsers are able to read the code and
display it.
⮚ TypeScript has a feature known as Static typing but JavaScript does not
support this feature.
content
1. To download Node.js, you go to the download page on the Node.js website.
2. To install Node.js on Windows, double-click the installer file that you have dơnload to launch
the setup wizard.
3. To confirm the installation, you can open Command Prompt or Windows Terminal and type the
following command:
4. To Verify installed
The
Node JStitle
- First Program
content
⮚ To Create a New File as hello.js
⮚ Open the command prompt
⮚ To Run This JS code File , Command : Node <FileName>.js
hello.js
...
⮚ .
......
⮚ .
PART
04
Cypres
s
Cypress is an open-source and free test automationtool,
be used extensively in the long run.
which can
Cypres
s
Why
Cypress?
• Zero configuration to get started
• Low learning curve
• Excellent development experience
• Everything is already packed for using
• Automatic waiting
• Control of network traffic
• Various types of automated tests
• Top-notch documentation!
• Help from the front-end developers
• Cypress has an engaged community, with professionals worldwide
helping and spreading their success stories.
Cypress – Introduction
Cypress is an open-source and free test automation tool, which can be used extensively
in the long run. It is mainly used for front end test automation. This tool is mainly
developed to solve the issues that the teams face, while automating an application.
• Configure tests.
• Create tests.
• Execute tests.
• Identify errors (if any).
Cypress is based on Javascript and executes tests within the browser. It helps to develop
the tests which include:
• Integration tests
• Unit tests.
• End to end tests.
Cypress – Advantages
⮚ Cypress framework captures snapshots at the time of test execution. This allows QAs or developers to
hover over a specific command in the Command Log to see exactly what happened at that particular
step.
⮚ One doesn’t need to add explicit or implicit wait commands in test scripts, unlike Selenium. Cypress
waits automatically for commands and assertions.
⮚ Developers or QAs can use Spies, Stubs, and Clocks to verify and control the behavior of server
responses, functions, or timers.
⮚ The automatic scrolling operation ensures that an element is in view before performing any action (for
example Clicking on a button)
⮚ Earlier Cypress supported only Chrome testing. However, with recent updates, Cypress now provides
support for Firefox and Edge browsers.
⮚ As the programmer writes commands, Cypress executes them in real-time, providing visual feedback
as they run.Cypress carries excellent documentation.
Limitations of Cypress
⮚ One cannot use Cypress to drive two browsers at the same time
⮚ Cypress doesn’t provide support for browsers like Safari and IE at the moment.
Browsers Supported Chrome, Edge, Firefox, Electron Chrome, IE, Safari, Edge, Firefox,
Opera
Frameworks Supported Supports only Mocha JS Supports multiple frameworks based
on specific programming languages.
(For e.g: JUnit for Java, Cucumber for
JavaScript, etc.)
There are some disadvantages of using Cypress and they are listed below:
⮚ A relatively new tool and hence, the community support is not extensive
⮚ We need to create the package.json file with the below command from terminal:
npm init
⮚ We have to enter details like the package name, description, and so on, as
mentioned in
the image given below:
Cypress - How
Cypress to create
- How to acreate
Project a Project
Step 2
⮚ Once done, the package.json file gets created within the project folder with the information
we have provided.
Cypress - How
Cypress to create
- How to acreate
Project a Project
Step 3
Once Cypress has been configured, a framework gets created within the
project which is automatically visible in the Explorer. The new test file (say
FirstTest.spec.js) should be created within the integration folder, as mentioned
below.
Cypress - Test Execution
For execution from the command line, run the command given below −
Here, all the files within the integration folder get triggered.
For execution from the Test Runner, run the command stated below −
Then, click on the spec file that we want to trigger for execution.
Cypress - Test Execution
To trigger execution for a specific file from command line, run the command
mentioned below −
To run the execution in Chrome, you need to run the below mentioned
command −
To run the execution in headed mode, run the command given below −
From the command line, Cypress executes tests in headless mode, if no option is
specified.
Cypress topics to be covered
Ref Link :
https://www.tutorialspoint.com
/cypress/index.htm/
PART
05
Git
⮚ Git is a popular version control system. It was created by Linus
Torvalds in 2005, and has been maintained by Junio Hamano since
then.
⮚ It is used for:
• Tracking code changes
• Tracking who made changes
• Coding collaboration
Git
Why
•
•
Git?
Over 70% of developers use Git!
⮚ Git is foundation of many services like GitHub and GitLab, but we can use Git
without using any other Git services. Git can be used privately and publicly.
⮚ Git was created by Linus Torvalds in 2005 to develop Linux Kernel. It is also used
as an important distributed version-control tool for the DevOps.
⮚ Git is easy to learn, and has fast performance. It is superior to other SCM tools like
Subversion, CVS, Perforce, and ClearCase.
What does Git do?
⮚ Branch and Merge to allow for work on different parts and versions of a project
⮚ Git now creates a hidden folder to keep track of changes in that folder
⮚ The Staged files are Committed, which prompts Git to store a permanent
snapshot of the files
⮚ Git does not store a separate copy of every file in every commit, but keeps track of
changes made in each commit!
Git Commands: Working With Local
Repositories
⮚ git init : The command git init is used to create an empty Git repository.
⮚ git add : Add command is used after checking the status of the files, to add those
files to the staging area.
⮚ git commit ; The commit command makes sure that the changes are saved to the
local repository.
What is GitHub?
⮚ GitHub is the largest host of source code in the world, and has been owned by
Microsoft since 2018.
Ref Link :
https://www.tutorialspoint.com/git
/index.htm
THANK YOU