Documenting use cases

Discussion in 'iOS Programming' started by devQ, Jan 7, 2016.

  1. devQ macrumors newbie

    Aug 11, 2014
    What is the best way to document use cases for ios app? I have an app which will need workflow descriptions for documentation and testing, and want to cover all cases of usage.

    One solution is to manually create text files, but it would be time consuming. Other would be to draw UML diagrams, but drawing for every single use case would be also time consuming and tedious. Any third option?

    Can someone recommend me tool that would ease up the process? What is the proper way to do it?
  2. Mascots, Jan 7, 2016
    Last edited: Jan 7, 2016

    Mascots macrumors 68000


    Sep 5, 2009
    I'm pretty dense so I'm not quite sure what you mean by use case. Are you talking about the higher level functioning, flow, and user focused usage of your app? If so, you should be UI testing and then documenting directly on those tests' actions in the methods. This allows you to document why instead of how which can easily be determined by reading a test's work-flow or by providing a basic summary. It also means you can perform tests without explicit human intervention until something unexpected happens, which reduces workload by gobs.

    When needing to get that information out, having structured comments with something like HeaderDoc will allow you to gather them directly from source files so you don't need to maintain a collection of information independently from the actual code base. I believe it is also possible to rig your documentation generation to allow you to get multiple sets (like a code-based documentation from your app's primary target and a UI-based doc from your UI test target).

    Does that sound about what you want?
  3. devQ thread starter macrumors newbie

    Aug 11, 2014
    Thank you.

    Yes, I was talking about user actions. My knowledge on UI testing is almost non existent. Can you recommend me some good tutorials or books, or any quality resource? Preferably for Obj C.

    About documentation, if I understood you correctly, idea is to create comments for tests, and generate documentation from there? Like on rest of the code e.g. VVDocumenter + Doxygen ( or HeaderDoc or AppleDoc).
  4. 1458279 Suspended


    May 1, 2010
  5. Mascots macrumors 68000


    Sep 5, 2009
    As far as resources and basic knowledge, I can help point you in a few directions. The first is to look at the tools, of which I suggest either of the two: UI Testing in Xcode 7 or KIF. I'm an advocate of KIF since Xcode just isn't there yet and I have hundreds of tests written in the latter. Are you familiar with testing at all? If not I'd also suggest taking a look at Unit Testing with Xcode, since that will break you into XCTest.

    And yep, that's exactly what I was suggesting for docs. There are alternate methods, but I prefer to keep it all as close to the relevant code when possible since that'll keep it consistent and the most helpful.
  6. devQ thread starter macrumors newbie

    Aug 11, 2014
    Great. Then I'll start from XCTest and check out KIF later. Thx.

Share This Page