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

  • Home
  • SEARCH
  • 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 6777183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:07:02+00:00 2026-05-26T16:07:02+00:00

I have been reading a lot about test-driven development and decided that I want

  • 0

I have been reading a lot about test-driven development and decided that I want to give it a go on a small project. For reference, I am currently reading ‘Growing Object-Oriented Software, Guided by Tests’.

I understand how to unit test my application and how to unit test certain parts of the UI as well, but I am struggling to set up end-to-end tests. For example, testing that a certain path through my whole application produces the correct output (this is my basic understanding of an end-to-end test).

It’s not necessary to simulate click events, but it is necessary to have some sort of connection to the UI.

Am I right in thinking that I need a combination of “Logic” tests (test without launching the app), “Application” tests (test with launching the app) and the asynchronous functionality of something like GHUnit to accomplish this?

EDIT:

After reading some of the answers below, it sounds like I’m looking for functional end-to-end testing, but I think I should give an example of a test as I imagine it.

  1. Start the application.
  2. Call the login function with a test users credentials. (Note: doesn’t necessarily need UI automation).
  3. Verify a label on the window says “Logging In…”.
  4. After successfully verifying the user, verify the label now says “Welcome, Adam!”.

KIF sounds like it could work, as it has steps to check changes in UI elements and it looks like there is a Mac OSX branch also. I’m sure I could also write a small class which constantly polls the UI for changes I expect and times-out after a certain time, but I’m wondering if this the right way to go about it.

However, perhaps I am trying to take what I am reading in ‘Growing Object-Oriented Software, Guided by Tests’ and trying to apply it too literally to Cocoa.

Another UPDATE:

So I’ve been reading the advice so far, checked the various places linked to and started to implement something whilst still referencing the book. I think what I’m really trying to get at is the Test-Driven-Development part. What stood out most in said book, was that they described what they wanted to happen from a users perspective first with acceptance tests.

I realise that solid unit testing will be necessary as soon as I start writing methods, but I was keen to write some high-level acceptance tests first, using some of the UI. I have started to write my own application “driver” class, using some similar methods to the GHAsyncTestCase ideas to help me accomplish this. Does this sound correct/useful/necessary?

I really appreciate all the comments so far and they have definitely helped me work out in my own head what I’m trying to do and what various areas of testing there are. I will finish up this question soon, as it is getting rather large, so any final advice is welcome!

  • 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-26T16:07:03+00:00Added an answer on May 26, 2026 at 4:07 pm

    I think the key thing that I got from “Growing Object Orientated Software” was to decouple as much as possible from the UI. Without code to look at it’s harder to give suggestions but with your revision I’d think that separating the “verify a label says..” bit from the UI. What is setting this message, and can you just test for that event?

    The more you can decouple from the UI the more you can unit-test (quicker and easier) rather than integrating other frameworks or drivers of UI elements.

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

Sidebar

Related Questions

I have been reading a lot about how flash development/design had died, and as
I have been reading a lot about Haskell lately, and the benefits that it
I have been reading a lot about C++ casting and I am starting to
Lately I have been reading a lot of blog topics about big sites(facebook, twitter,
I have been reading a lot about HTML 5 and some of the changes
I use jQuery. I have been reading a lot about selector performance and optimizing
I have been reading a lot about how and why to use an MVC
I have been reading a lot about Ruby the past few days. Every SO
I have been reading a lot about Reinforcement Learning lately, and I have found
I have been reading a lot about MVC these days and I think 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.