Author Topic: Recording detailed use case  (Read 2594 times)

weblander

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Recording detailed use case
« on: April 18, 2006, 09:45:43 am »
I've just been looking around at how to make detailed use cases with EA. I'm able to add scenarios to the use case which goes some of the way with basic path etc but I was hoping to have a more structured way of enetering this information with the steps of the basic path numbered and with sub steps etc.

Is there anyway to do this within EA or am I forced to restort to word for this level of detail?

Cheers

+Steve

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Recording detailed use case
« Reply #1 on: April 18, 2006, 12:56:50 pm »
I gather you want something more definitive, identifying the steps as something other than 'just' text with embedded numbers (or something) to show which step is which.

You can add an associated diagram, which can be an Activity Diagram, State Chart, or one of several other types. This would allow you to illustrate the steps in the use case in a clearer manner.

Don't quite know if that helps. Let me know.
No, you can't have it!

thomaskilian

  • Guest
Re: Recording detailed use case
« Reply #2 on: April 18, 2006, 01:37:21 pm »
Writing Use Cases (as suggested by Cockburn, Bittner, et al.) with EA is a bit limited. You can use the scenarios to write most of the text. But formatting is only possible by handwritten HTML or Wiki-like style. Another (often used) way is to place the scenarios in a Word document or (as being possible recently) in a linked document. I adopted a mixture of the above and what ICONIX is using for writing Use Cases.

kevincam

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Recording detailed use case
« Reply #3 on: April 18, 2006, 02:00:39 pm »
Yeah it would be nice to have at least bullets and auto-numbering of the steps in the scenario.

nara_c

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Recording detailed use case
« Reply #4 on: April 18, 2006, 02:08:54 pm »
Quote
... Another (often used) way is to place the scenarios in a Word document or (as being possible recently) in a linked document....


I follow a similar approach as suggested here.  I created a custom Linked document template with the place holders for the various Use case description sections that we use.  The within the EA properties box I only specify the name and a brief description in the Notes field.  For the rest of the description including scenarios, I use the Linked document.  

To print out the details I ensure that the RTF template I use has the "model document" option ticked so that the linked document is displayed with formatting and all.  This has worked well for me and my team.

One caution though is that if you use EA even for documenting and maintaining your test scenarios, you will not have the ability to import the scenario steps since they are not in the use case property but rather in a linked document.

Another hint which I found useful for documenting detailed Use cases is to use named flows instead of numbers.  This way instead of referencing a number in an alternate flow or other use case (such as at step 5 of Basic flow), I mention the location of the flow (such as at [request customer details] of basic flow).  The obvious advantage of this is that in case I introduce an extra step in the flow during use case review then I will not need to renumber all the referenced location since the name remains the same.

Hope this helps.

weblander

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Recording detailed use case
« Reply #5 on: April 19, 2006, 08:51:18 am »
Thank you everyone for all your responses - even though it confirmed my suspicions.

Thank you also for the suggestions. I'm not sure which way we are going at the moment - probably in word and then creating the link - at this stage I don't know as we are moving more on to state diagrams and class diagrams etc which is more solid ground for me and where EA shines more.

It is a shame EA doesn't support detailed use cases as per Writing Use Cases. Although your suggestions may help in some way I would still favour direct built in support for detailed use cases as I personally feel it would add even more value to an already exceptional product.

Once again. Thank you all for your help (and prompt as well) and suggestions for work arounds.

Cheers

+Steve

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Recording detailed use case
« Reply #6 on: April 19, 2006, 10:10:19 am »
Steve,

This is really worth requesting as a feature. Use the Help / On-line Resources / Request a Feature menu choice from within EA. This gets the request right into the Sparx hopper, and they take these requests seriously.

David
No, you can't have it!

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Recording detailed use case
« Reply #7 on: April 19, 2006, 09:17:27 pm »
Quote

Another hint which I found useful for documenting detailed Use cases is to use named flows instead of numbers.  This way instead of referencing a number in an alternate flow or other use case (such as at step 5 of Basic flow), I mention the location of the flow (such as at [request customer details] of basic flow).  The obvious advantage of this is that in case I introduce an extra step in the flow during use case review then I will not need to renumber all the referenced location since the name remains the same.

I really like this idea.  Can you expand a bit on how you form and place a flow's name?  Perhaps two or three lines to demonstrate the technique?

Thanks
Verbal Use Cases aren't worth the paper they are written upon.

TrtnJohn

  • EA User
  • **
  • Posts: 176
  • Karma: +0/-0
    • View Profile
Re: Recording detailed use case
« Reply #8 on: April 20, 2006, 12:08:41 pm »
I think EA has adopted more of the ICONIX view of use case text and not the Cockburn implementation.  If would be nice if there was an option to describe your Use Cases either way.  Plus, EA could automatically manage your path numbering and such for Cockburn style uses.  This would be a big plus.

thomaskilian

  • Guest
Re: Recording detailed use case
« Reply #9 on: April 20, 2006, 04:33:33 pm »
Quote
I really like this idea.  Can you expand a bit on how you form and place a flow's name?  Perhaps two or three lines to demonstrate the technique?

Thanks

Jim,
it's just like nara_c wrote. Place labels like [perform login] at any meaningful location in the UC scenario. Then you can write the extension separately. Inside the extension you can specify something like "resume at [perform login]" or "The UC ends here". Your UC might look like Pseudo Code afterwards and it might also result in spaghetti pseudo code (or pseudo spaghetti code) ;)

nara_c

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Recording detailed use case
« Reply #10 on: April 20, 2006, 06:30:40 pm »
Quote
Jim,
it's just like nara_c wrote. Place labels like [perform login] at any meaningful location in the UC scenario. Then you can write the extension separately. Inside the extension you can specify something like "resume at [perform login]" or "The UC ends here". Your UC might look like Pseudo Code afterwards and it might also result in spaghetti pseudo code (or pseudo spaghetti code) ;)


Actually that is not what I meant it.  You seem to refer to use of placeholders to indicate includes use cases or subflows.  I meant using named steps instead of numbered steps.  In fact I avoid psuedo code kind use cases descriptions since they are difficult to follow.  I prefer to select one path as the happy day scenario with no conditional flows and add all other flows as alternate scenarios.

Jim, in response to your request, here is an example based  on an example use case from Rational. ( I have added the example text in Blue to differentiate from my comments)


--- Use Case description follows ---
1.    Brief Description
This use case allows a professor to select the course offerings (date- and time- specific courses will be given) from the course catalog for the courses that he/she is eligible for and wishes to teach in the upcoming semester.

The actor starting this use case is the Professor. The Course Catalog System is an actor within the use case.

2.    Flow of Events
The use case begins when the professor selects the "select courses to teach" activity from the Main Form.

2.1     Basic Flow – Select Courses to Teach

[Display list of courses]
* The system retrieves and displays the list of course offerings the professor is eligible to teach for the current semester. The system also retrieves and displays the list of courses the professor has previously selected to teach.

* The professor selects and/or de-selects the course offerings that he/she wishes to teach for the upcoming semester.

* The system removes the professor from teaching the de-selected course offerings.

[Validate selection]
* The system verifies that the selected offerings do not conflict (i.e., have the same dates and times) with each other or any offerings the professor has previously signed up to teach. If there is no conflict, the system updates the course offering information for each offering the professor selects.

2.2     Alternative Flows

2.2.1    No Courses Available
At [Display list of courses] if the professor is not eligible to teach any courses in the upcoming semester the system will display an error message. The professor acknowledges the message and the use case ends.

--- end of use case ---


Now the advantage of this is that, I do not need to add named steps for each part of the flow.   In case on further analysis I discover other alternate flows are possible from other steps I can include a named step there and use that in the alternate flow.

for e.g.  in the above illustration, say the system has to be built to warn the professor if they have removed all courses thus having no courses to teach in the next semester.  To include this in the description all I need to do is first include a named step in step 2 above as shown


[Professor makes selection]  
* The professor selects and/or de-selects the course offerings that he/she wishes to teach for the upcoming semester.


Then I add another alternate step


2.2.2 All courses removed
At [Professor makes selection]  if the proferssor has removed/deselected all courses that he or she is offering thus resulting in no courses being on offer, the system should display a warning and request confirmation before proceeding.


The real advantage with this approach is when a new step is introduced early in the use case flow.  In the numbered steps approach traditionally used this would result in renumbering all the steps and thus updating the reference numbers in other locations such as alternate flows.  
This is a situation that often occurs since as we all expereinced use cases continue to grow as the system is developed or refined.

Hope this explanation helps and you find this approach useful.

Cheers

TrtnJohn

  • EA User
  • **
  • Posts: 176
  • Karma: +0/-0
    • View Profile
Re: Recording detailed use case
« Reply #11 on: April 26, 2006, 12:20:03 pm »
nara_c,

I like this notation.  Although I don't see how you could possiblke keep out resume logic like Jim was describing.  For example, what would you do if your alternate path prompted for the option to abort or continue?  You must add some text to describe some resume back to the basic path if the professor selected continue...

TrtnJohn

  • EA User
  • **
  • Posts: 176
  • Karma: +0/-0
    • View Profile
Re: Recording detailed use case
« Reply #12 on: April 26, 2006, 12:24:11 pm »
I just realized a few more questions:

What do you do with alternate paths that get somewhat involved?  Do you name steps here as well?  What about alternate paths that actually have their own alternates?

nara_c

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Recording detailed use case
« Reply #13 on: April 26, 2006, 02:34:55 pm »
Quote
nara_c,

I like this notation.  Although I don't see how you could possiblke keep out resume logic like Jim was describing.  For example, what would you do if your alternate path prompted for the option to abort or continue?  You must add some text to describe some resume back to the basic path if the professor selected continue...



You are correct.  In provided a very basic example where I focussed on explaining the named steps concept.  As a result, I missed a very import step in the Alternate flow definition (i.e.) stating to which point it would return.  Here is the relevant flows of the revised example, in an attempt to clarify further.

2.2.2 All courses removed - Confirmed

At [Professor makes selection]  the professor has removed/deselected all courses that he or she is offering thus resulting in no courses being on offer.

*The system displays a warning and requests confirmation that the professor is not teaching any courses for the semester.

*The Professor confirms that they will not be taking any courses.

*The system records the changes and the use cases ends.



Note how the description of the alternate flow indicates the point at which it enters this flow from the main flow.  I prefer to use bullet points for each step of the alternate flow instead of named steps initially as I describe the use case.  

Quote
I just realized a few more questions:

What do you do with alternate paths that get somewhat involved?  Do you name steps here as well?  What about alternate paths that actually have their own alternates?



In response to this, I do not normally run into too many situations where alternate flows have other alternates.  Having said that, in the above example, the professor could have removed all courses by accident and then rejected his choice in the confirmation step.

So going back to my ealier advantage of the named flows method, I could then name the step in the alternate flow where the system prompts the professor as [System prompts for confirmation] and create a new Alternate flow as follows.

2.2.3 All courses removed - Not confirmed

After [System prompts for confirmation] in alternate flow 'All courses removed - Confirmed' if the professor does not confirm the action the following flows occur.

*The Professor rejects the changes since they will be taking courses.

*The system rejects the changes and returns to [Display list of courses] in 'Basic Flow - Select Courses to teach'.



Note the flexibility of this approach as opposed to the numbered steps approach where if you used numbers instead of names you may have to constantly be renumbering to point to correct points.

It is important to also note that the focus of this approach is to replace numbered steps with named steps.  I beleive it will work with any style of use case documentation that you prefer.  Personally I do not like to have psuedo code like steps in a single flow and hence break them up into multiple discrete steps.  Tends to make for a longer use case desciption, but given that non-technical end users are often the target audience of the use cases this is less confusing.

Hope this helps.

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Recording detailed use case
« Reply #14 on: April 26, 2006, 07:02:15 pm »
Is everyone aware that MS Word has the ability to insert references to numbered paragraphs?  If the referenced paragraph is renumbered for any reason, Word will automatically update all references to it.

Given this feature of Word, I'm not sure of the value of Named Flows...?
Verbal Use Cases aren't worth the paper they are written upon.