Sunday, February 27, 2022

Lets play with cypress - Part 2

 In the first part I explained starting of my automation journey with first command to setup cypres at the end i.e. npm install cypress -g Next steps were to create a project with npm init commad and as pre-requisite I had node installed already. 

After init command I provided required information through command prompt and within a minute I had my project created and I opened it in vs code through code . command on cmd.

Once vs code is opened with my project loaded in it, next command was cypress open and magic happened. Default cypress template get generated with basic and advanced examples folders in it. 

As we can see, cypress has particular project structure and by default we used to write our tests in side integration folder. We can divide our tests into folders based of features as this separate is logical so its totally upon us who confortable we are in that decision. I know thats quick one but that is all for part 2 where we have created a project with default test examples, code if this test project can be found on my github repository here : where I am already ahead of my blog post. Stay tuned for the next part.

Sunday, February 20, 2022

Lets play with cypress - Part 1

 As tech geek I am a big fan of automating stuff, where stuff means, software development related activities 😆 in context of this post, its software testing automation. It all started when I fist used postman to test my .net based web Restful API's and while playing with that awesome tool, I came to know, it has its brother newman (cli tool) as well. Long story short, it bacame a hebit to make collections of my apis and smooke them after every release in CI/CD through newman and run test on my machine through postman. I think this is enough for building the basis, lets swith the context a little bit.

Recently as a team we decided to choose cypress as testing automation framework amongst couple of others based of following points:

- Its javascript framework, can be used by a developer or a QA to write tests which require basic knowledge of javascript.

- Supports vast varity of tests i.e. End-to-end, Integration and unit tests.

- More attractive features i.e. Network traffic control, automatic waits and screenshoots / videos are most popular ones.

Before I write Part2 of this learning, I must confess, before writing my first automated test, I ran :

npm install cypress -g

Exactally, I installed cypress as global package.  Lets see, what if we install it in project scope later down in this series.

Sunday, September 26, 2021

Area Routing in dotnet5 - BlogEngine

 Areas are small function units consists of Controllers, Views and models. Assume as scenario where we have two roles lets say, User and Admin. We know that these two roles require different views on website and hence different functionality. Admin has full control and user can only view or add comments on a post. This scenario require to have a separate area for Admin where we can manage its own functionality and UI. 

In dotnet5 we can add area by right clicking on project and click on Add and select Area. And from routing point of view its very important to configure area correctly.


For complete project checkout Dotnet5 Blog Engine

Lets play with cypress - Part 2

 In the first part I explained starting of my automation journey with first command to setup cypres at the end i.e.  npm install cypress -g...