Assertions and Grid In Selenium
Posted By : Pooja Kumari | 07-Aug-2020
Introduction
Assertions are a means for tester or developers or users to determines the state of the application whether the state is the same as what we are expecting or not. It is used to validate any kind of test. It always provides a result on the basis of actually expected result comparison. Failed assertions indicate the failed test cases and stopped executions. Whenever the result of assertions show no exception it means test is considered passed. Therefore we can say that assertions paly one of the most important roles in identifying the flow of application being tested.
Types of Assertions:
1. Soft Assertion.
2. Hard Assertion.
Hard Assertion: It throws AssertException when the test cases are failed. Error in these cases is handled by using catch block.
Following method are available in hard Assertions:
1. Assert Equals
2. AssertNotEquals
3. AssertTrue
4. AssertFalse
5. AssertNull
6. AssertNotNull
Soft Assertion: To overcome problems like when someone wants to execute the whole script if the assertion failed then we use soft assertions in testing.
Selenium Grid: It is a feature in selenium using this user can run test cases in different machines across different platforms. In local machine control triggering of test cases are available and when the user triggered the test cases then test cases are automatically executed by the remote machine. Initially, test cases are written in local machines and executed on the same. Users can run test cases in parallel in multiple machines on the selenium grid.
Architecture of Selenium Grid
Hub: It’s a central point or local machine which receives all the test case requests and it distributes them to the right nodes.
Basically hub is the machine that triggers the test cases. And it should be only one in the selenium grid.
Node: These are the selenium instances that will execute the test cases that you loaded on the hub. With different platforms and browsers nodes can be launched on multiple machines.
We, at Oodles Technologies, provide end-to-end software development services that include UI/UX design, application development, integration, deployment, and software testing services. Our development team specializes in building performance-driven software applications with a focus on next-gen technologies. We have our expertise in SaaS application development, OTT app development, IoT development services, cloud app development services, DevOps solutions and services. We also provide 360-degree quality assurance services to ensure that your software application performs seamlessly across devices with minimal lag or latency.
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Pooja Kumari
Pooja is QA engineer . She has knowledge of manual testing and SQL. And keen to learn new things.