Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 950417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:33:42+00:00 2026-05-15T23:33:42+00:00

After learning about TDD and unit testing, I’m really looking to write tests when

  • 0

After learning about TDD and unit testing, I’m really looking to write tests when I code, preferably before I code because I see the benefits coding in Python. I’m developing a website, and I’m trying to write tests according to the requirements, but its proving more difficult than expected.

I can see the benefits of writing tests when you’re producing a library of code with a public interface for others to use. Developing a website, where there is really not much logic, and mostly Reading and Writing against a database seems a little harder to unit test. Mostly, I have to create/edit/delete rows in the database.

I’m using a framework (Kohana 3 for php), so 99% of all the libraries and helpers that I’m going to be using have already been tested (hopefully), so what else is their to write tests for?

I’m mostly talking about scripting languages, not about CSS or HTML, I already know about cross-browser testing.

How much can you really test when developing a web site, and how should you go about it?

Edit: Is the lack of activity on this question a sign? I understand that certain things MUST be tested, like security and the like, but how much can be written using unit tests and TDD is the question.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:33:42+00:00Added an answer on May 15, 2026 at 11:33 pm

    Developing a website, where there is really not much logic, and mostly Reading and Writing against a database seems a little harder to unit test. Mostly, I have to create/edit/delete rows in the database.

    Not completely true.

    You have data model processing. Does the validation work? Do the calculations on the reported rows from the database work?

    You have control, sequence and navigation among pages — do the links work? The test setup will provide a logged-in-user. The test will (1) do a GET or a POST to fetch a page, then (2) confirm the page actually loaded and has the right stuff.

    You have authorization — who can do what? Each distinct test setup will provide a different logged-in-user. The tests will (1) attempt a GET or POST to process a page. Some tests will (2) confirm they got directed to error-response pages. Some tests will (2) confitrm that the GET or POST worked.

    You have content on the page — what data was fetched? The test setup will provide a logged-in-user. The test will (1) do a GET or a POST to fetch a page, then (2) confirm the page actually loaded and has the right stuff.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After learning about the Action delegate in C# I've been looking for ways I
My company is fairly new to unit testing our code. I've been reading about
Started learning TDD and met some misunderstandings about different approaches for writing tests. In
After learning a bit of how LLVM work I'm really excited about how portable
I'm learning about unit testing, and I'm trying to understand where the pieces fit
I installed Visual Studio 2012 Ultimate RC this morning after learning about IntelliTrace at
Started learning Wicket after ASP.NET MVC and feel a little bit confused about managing
I am just learning how to use Terracotta after discovering it about a month
I'm learning TDD, and I have a question about private / protected variables. My
After learning about jQuery and the whole AJAX thing, I got very excited. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.