
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 201 Articles for Dynamic Programming

347 Views
Cypress data-driven testing is achieved with the help of fixtures. Cypress fixtures are added to maintain and hold the test data for automation. The fixtures are kept inside the fixtures folder (example.json file) in the Cypress project. It basically helps us to get data input from external files.Cypress fixtures folder can have files in JSON or other formats and the data is maintained in "key:value" pairs. All these test data can be utilized by more than one test. All fixture data has to be declared within the before hook block.Syntaxcy.fixture(path of test data) cy.fixture(path of test data, encoding type ) ... Read More

6K+ Views
We can upload a file in Cypress. To perform the file upload task in Cypress, we have to first install a plugin with the command −npm ins tall –dev cypress-file-uploadOnce the installation is done, we have to add the statement import 'cypress-fileupload' in the command.js file which resides inside the support folder within our Cypress project. Also, we shall add the file that we want to upload within the fixtures folder(Picture.png file).To upload a file, we have to use the Cypress command, attachFile, and pass the path of the file to be uploaded as a parameter to it.ExampleImplementationdescribe('Tutorialspoint Test', function ... Read More

200 Views
Cypress aliases are an important component that has multiple uses. They are listed below −Sharing ContextWe have to use .as() to alias something that we have to share. To alias objects and primitives, Mocha context objects are used. The aliased object can be accessed with - this.*.Mocha by default shares context for all the hooks applicable for the test and the alias properties are flushed post the execution of a test.describe('element', () => { beforeEach(() => { cy.wrap('eleone').as('x') }) context('subelement', () => { beforeEach(() => { cy.wrap('eletwo').as('y') ... Read More

2K+ Views
Postman POST request allows appending data to the endpoint. This is a method used to add information within the request body in the server. It is commonly utilized for passing delicate information.Once we send the request body via the POST method, the API, in turn, yields certain information to us in Response. Thus a POST request is always accompanied by a body in a proper format.Create a POST RequestStep1 − Click on the New menu from the Postman application. The Create New pop-up comes up. Then click on the Request link.Step2 − SAVE REQUEST pop-up comes up. Enter Request name ... Read More

13K+ Views
Postman DELETE request deletes a resource already present in the server. The DELETE method sends a request to the server for deleting the request mentioned in the endpoint. Thus it is capable of updating data on the server.Before creating a DELETE request, we shall first send a GET request to the server on the endpoint http://dummy.restapiexample.com/api/v1/employees .On applying the GET method, the below Response Body is obtained.Let us delete the record of id 2 from the server.Create a DELETE RequestStep 1 − Click on the New menu from the Postman application. The Create New pop-up comes up. Then click on ... Read More

571 Views
Scenario Outline is used to replicate the same Scenario with a different data set. Writing the same tests with different values is cumbersome and time taking. For instance, We can club the above two scenarios with the Scenario Outline.Thus, we see that a Scenario Outline should be accompanied by keyword Examples. A Scenario Outline is executed once for each of the rows appearing below the Examples segment.Also, we have seen that the Given step has the delimiter. It points to the header of the Examples table. SpecFlow shall put the values within this table before the task of matching ... Read More

5K+ Views
We can perform data-driven testing with the help of keyword Examples. We shall also take the help of keyword Scenario Outline to execute the same Scenario over multiple values.The data sets to be taken into consideration shall be passed below the Examples section one after another separated by | symbol. So, if there are three rows, we shall have three test cases executed from a Single scenario.Also, the Given step has the delimiter. It points to the header of the Examples table. SpecFlow shall put the values within this table prior to the task of matching a step with ... Read More

10K+ Views
The Background keyword is applied to replicate the same steps before all Scenarios within a Feature File.Background RulesLet us describe some of the rules while applying Background −It should be used for defining simple steps unless we are forced to bring the application to a state which requires complicated steps to be carried out. As requested by the stakeholders of the project.It should be brief and realistic.All the Scenarios should also be short and to the point.Background ExampleLet us see an example where we have used Background steps to be executed before all the tests in the Feature File. For ... Read More

343 Views
Test-Driven Development is also known as the TDD. It consists of the below steps to be followed one-by-one −Step 1− Create a Test.Step 2− Verify if the test fails.If the test passes, create the second test.If the test fails, then move to Step 3.Step 3− Fix the test to make it pass.If the test passes, move to Step 4.If the test fails, then jump to Step 3.Step 4− Start code refractor and redo all the above steps till the development is done.Benefits of TDDThe benefits of TDD are listed below −The developer is required to apprehend the requirements to know ... Read More

2K+ Views
To execute the Feature file, we must add the implementation logic for each of the steps. To add the definition of the step in SpecFlow, the C# language is used. Thus, a Step Definition File contains methods developed in C# within a Class.The methods have annotations along with a pattern to connect the Step Definition to every matching step. SpecFlow shall run the code to execute the keywords in Gherkin.A Step Definition file is a link between the application interface and Feature File. For providing readability features, the Step Definition File can have parameters. This signifies that it is not ... Read More