I will keep Selenium in mind for future when I¡¯m doing UI work.
Maybe I can get more specific with my present concern.
I create an API service /xyz. ?That works by calling a 3rd party service but only works if I have an auth token. ?Otherwise it returns http redirect to the login page. ?Or maybe it should return ¡°Unauthorized¡± and my Javascript should react to this by navigating to /login.
In either case, now I want to write a test for /xyz. ?But this test cannot pass unless I have a token, that is only obtained by following the login process. ?So how can I write a test of /xyz? ?Maybe in the short term I just manually login for the server and then run all the tests, but longterm I want to avoid this. ?I must be missing some secret of how these things are done.
toggle quoted message
Show quoted text
On Mar 8, 2022, at 13:28, Vijay via groups.io <vijay_nathani@...> wrote:
?NUnit is Ok for Unit Testing C# code.
For the Integration tests, you can use NUnit. Just ensure that these tests can be run seprately.
For UI testing, you will can add selenium to NUnit.