changeweb / Unifiedtransform

A school management Software
https://changeweb.github.io/Unifiedtransform/
GNU General Public License v3.0
2.81k stars 1.23k forks source link

Test Coverage for Login User Authentication #350

Closed HermanCeaser closed 2 years ago

HermanCeaser commented 2 years ago

Hello,

I decided to write tests for Authentication specifically login because i realized there was no test coverage at all in v2. I don't know what format i had use but i tried as much as possible to folloe best practices.

All you have to do is run: php artisan test after successful setup

For now, the tests cover

as shown below testut

Thank you

changeweb commented 2 years ago

Hello,

I decided to write tests for Authentication specifically login because i realized there was no test coverage at all in v2. I don't know what format i had use but i tried as much as possible to folloe best practices.

All you have to do is run: php artisan test after successful setup

For now, the tests cover

  • If a user can view login page
  • If a user cannot view login page after authentication
  • If a user can login successfully with correct credentials
  • if a user cannot login with incorrect password

as shown below testut

Thank you

Great work! These tests also pass in Travis CI pipeline environment. I wanted to write tests but I am not getting enough time to put in it. Hopefully V2 will also have a lot of test coverage like V1 with community effort.

HermanCeaser commented 2 years ago

Thanks @changeweb, looking into writing more tests if you can give me context on how to go about it. Like the flow of the application. Example test cases should do it