Answered What are all the possible scenario to write nunit test cases for login page

Sriram

New member
Joined
Sep 15, 2020
Messages
3
Programming Experience
1-3
I don't have idea about unit testing, what are all the possible scenario for test case to be written for a asp.net web application- login page
 
Is this for a class or for work?

Based on your other thread, it sounded like that was for work, so can we assume that this is for work as well? If so, are you sharing your salary with us to do the thinking for you?

What have you already thought about? What scenarios have you considered? Are you looking at both the happy path and the failure paths? Have you considered different clients/platforms/browsers?

Do you have code coverage requirement? (I assume you did based on your other thread where you wanted to automate creation of unit tests.)

And these are unit tests correct? Or are they also performance tests? Are they also security tests? Are they also integration tests?
 
Last edited:
Given that you write unit tests for individual methods and not entire pages, it seems to me that you either don't know what unit testing actually is or that you haven't made any attempt to apply appropriate unit testing methodology. Take a single unit, consider what the possible input states are and what the appropriate output states should be. We're here to help you with the stuff you can't do, not the stuff you can't be bothered to do. An appropriate question on this subject might be "here is the method I'm testing, here are my tests or test states, do you think I've missed anything". That's a case of doing what you can and then asking for our help when you reach your limits. "I want to do X, tell me how" is simply taking advantage. We're here to help, not do for you so you don't have to. We're more than happy to do the former but requests to do the latter will actually make the former less likely.
 
Marking this as answered as it has been answered as best it can be given how vague the question is. If our OP requires further help on this, they can ask any question on this subject once they gain an understanding on the subject and provide code they are troubleshooting. I further advise the OP to start here : Unit testing in .NET Core and .NET Standard - .NET Core and then follow the instructions and there is a tutorial also linked here : Unit testing C# with NUnit and .NET Core - .NET Core
 
Back
Top Bottom