How to make unit test website without base class?

A friend suggested, instead of having a backend class that checks the user's permission in each public function (the results are cached and not static), I should have a more streamlined site. When I deleted the backend, I also deleted the database code and combined them into the corresponding user permissions (basic user, logged_in_user, moderator).

Now the site code looks better, so merging them reduced LOC (tons of LOC actually), and I will write Method () instead of backend.Method (), which increases readability. However, now that I don't have a backend, how can I suggest unit test my code? and what about things like downloading a user file with different extensions? (txt vs jpg vs FLAC)

+5
source share
4 answers

You can always use something like selenium so that the browser launches your site and then approves the various conditions.

I do not think that these are technically unit tests. But better than not testing at all.

+5
source

You can use WatiN to test browser automation ...

+3
source

Google GTAC 2008. , . , , , - .

http://www.youtube.com/watch?v=5jjrTBFZWgk

+2
+1
source

All Articles