Book a Demo

Author Topic: Sorting Test scripts  (Read 3485 times)

vanmiila

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Sorting Test scripts
« on: June 24, 2008, 06:54:58 am »
Hi there!
I'm very new to EA, so there may be a configuration that I'm not thinking of.

Within my use cases I have a list of test scripts.  I have numbered them like this: 1.1a, 1.1b, 1.1c etc...  What i've found is sometimes they get out of order and will show in the Testing window as 1.1c, 1.1b, 1.1a.  When i click the "AZ" button to sort them (by test) - it will sort but not save, so the next time you look at the list, it will be out of order again.  And this is a problem, because when I print it out in RTF, they are out of order there too.  The only place it seems to keep its order is in the diagram.

BTW, i do have "Sort Features Alphabetically" checked in the Objects Options.

Not sure if posting a jpg of what I'm seeing will work....
Sorry if it doesn't  

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Sorting Test scripts
« Reply #1 on: June 24, 2008, 07:18:37 am »
It (the graphic) didn't. Search the forum for more information on how to do so.

Here's an idea, but it is a bit of a guess. Take a look at the Project Browser tree - by default it is open at the right side of your EA screen. Are the tests in the unsorted order? If so, open the Tools | Options dialog (control-F9 is the shortcut). In the lower center of the General (default) page you should see a Project Browser section. Ensure that the Allow Free Sorting option is checked. Once you've done that see if you can drag your tests into the order you want. Perhaps this will help. [As I said, it is a guess though, so check back to see if someone knows a 'real' solution.]

HTH, David
No, you can't have it!

vanmiila

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Sorting Test scripts
« Reply #2 on: July 04, 2008, 01:05:54 am »

Thanks so much David  ;D

I don't know if it was that (checking "Allow Free Sorting")  or that i did a Compact of the file, but my test scripts are now in order.

I am not able to drag and drop my test scripts because they are in the Testing View (what i was trying to show in the print screen).  I think this is the only place where you cannot drag and drop :(

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Sorting Test scripts
« Reply #3 on: July 04, 2008, 03:43:43 am »
It was the Allow Free Sorting option, but compacting the file from time to time helps. You might also want to run an integrity check every so often.

The free sorting really only applies to the Project Browser tree. For some other dialogs, there are some options that affect whether you can move things around. For example, on the Tools | Options | Objects dialog you will see three options that have an effect: Sort Features Alphabetically, which does just that for things like attributes and operations; and Group Operations (Attributes) by Stereotype, which divide the set of operations (attributes) by stereotype, each group respecting the current sort option.

I don't think the above options affect the Testing View; you see to be correct about the sort order there.

If tests sort alphabetically all the time, you might be able to get some leverage from using auto name counters. From the EA main menu choose Settings | Auto Name Counters. Note that these counters are specific to each project, so you must have a project open to set them up. They don't work retroactively, but see below.

You can also rename your tests with some 'outside' (of EA) work. Don't do this on your main project file; make a copy in case anything goes wrong. EA won't help you if something does. You'll have to export your tests; I think they come out as reference data. This will produce an XML file. You will need to inspect the file and use some form of editor to make the change. Note that if you have a high-end editor you might be able to script this. If you've got a development environment then perhaps a short program would work, and if you are a whiz with something like XSLT or LINQ perhaps you can whip up a fast transformation. Then import the tests again. [You might need to clear the old ones out first.]

HTH, David

PS: Perhaps you should make a feature request to Sparx for a sort option on the test list (and other lists as well, for that matter). Use the Feature Request link under the Support link near the bottom of any forum page. If you get a response from Sparx please post back to keep the rest of us informed.
No, you can't have it!