aquaman / clr-sessions

Command-line Ruby Session-Based Testing Framework
8 stars 3 forks source link

ignore anything below Issues #4

Closed jfry closed 13 years ago

jfry commented 13 years ago

Some folks might want to include additional info in session reports which don't need to be -- or can't yet be -- processed and reported on.

I suggest that anything below Issues section should just be ignored to enable those use cases.

aquaman commented 13 years ago

I like this idea. What do you think would be a good separator for the Scan Tool to pick up on?

I don't think it would be good to say something like "== Ignore everything below this line ==" Since the session sheet is for the human tester, we want the tester to use this section and only have the computer ignore it.

jfry commented 13 years ago

One option: if you can identify a section (say, something beginning with "text \n==========" and ending with the last \n before the next "text \n==========") then you can just have general rules that say

if section_title == "BUILD" some_logic elif section_title == "BUGS" some_other_logic elif section_title == "ISSUES" some_other_logic else #an unknown section ignore

Heck, it might even be worth having some way to end sections, if the regex to say "EOF || the last \n before the next section" is problematic, so that you have a way of knowing this is an expected section and this is an unknown (ignoreable) section

The advantage I see in this is it lets you have sections that're ignored now and possibly forever...but that if in the future you (or I or whoever) wants to add logic to parse a previously ignored section, it's all there, and we don't need to move it from below to above an "ignore below" line.

aquaman commented 13 years ago

Hm, I think this idea has potential, however, it also adds more complexity than I think it needs right now. Ideally, my preference is to move away entirely from this text-file-based system and into a proper database system.

I'm looking for the quick win, the simplest solution that meets the need.

jfry commented 13 years ago

Yeah, I think that's a good call.

A couple (hopefully easier options): (a) After Issues, start looking (pseudoregex) for "\n{anytext}\n=========" and then throw out that last bit and anything else, (b) Have a standard line like "End processing: Script ignores text below this line", or (c) Allow a configurable line -- some txt file that I can set which says ignore when you hit "NEW CHARTERS" and someone else can set to whatever they want to track.

aquaman commented 13 years ago

My (current) criteria for a (reasonable) separator line: 1) something the human reader of the doc will ignore and keep reading. So it needs to be something your eye will acknowledge and ignore; not pause to require mental processing or break your line of concentration/thinking. 2) something simple so the human (Tester) is less likely to tinker with 3) something not likely to appear in the Test Notes 4) needs to be on a single line (script currently parses one line at a time, so consecutive lines as cues would introduce more code complexity)

Some ideas I am currently contemplating:

A) """"""""""""""""""""""""" (i.e. line of double-quotes. Not likely to appear in Test Notes.)

B) =-=-=-=-=-=-=-=-=-=-=-=-= (artistic. simple repeating pattern of 2 chars. too fancy? if one character is accidentally deleted, might screw up auto-recognition)

C) ---------- c[_] --------- (a "coffee break" line. ;) this is an 'interesting' and unlikely combination of chars. I dropped it in a session sheet to see and I think it is subtle enough to work.)

I am currently leaning towards (C) right now. I like it. It's playful and different, and I like the "coffee break" symbolism attached to it. ==> when you get to the end of the session, take a break. :)

jfry commented 13 years ago

all of those work very well for me.

aquaman commented 13 years ago

Story (technically) Done.

Files updated = 2:

NOTES:

jfry commented 13 years ago

Sweet, thanks!

aquaman commented 13 years ago

Story is Done Done. :)

File updated = 1 (scan2.rb)

NOTES: I fixed a few bugs with missing sections, especially missing date/time stamp, causing undesired scan.log errors and a ruby exception. These bugs have been there for a while so they weren't introduced with this feature addition. However, working on this new feature made it a bit more apparent (to me at least, while testing).

I have tested the scan2.rb script with many different session sheets and it handles them much better now. This is good to go.