MarketSquare / Rammbock

Rammbock - generic network protocol tester
Apache License 2.0
62 stars 50 forks source link

Saving second message sequence image in same test overwrites the previous #40

Open jussimalinen opened 8 years ago

jussimalinen commented 8 years ago

The Embed sequence diagram keyword simply uses the <test name>.png as name for the saved message sequence diagram. This will cause subsequent diagrams in the same test to overwrite the previous. There should be somekind of automatic indexing for the images and also possibly a possibility to give the sequence filename.

samratashok87 commented 8 years ago

To increment the index value of the sequence diagram , where can we keep the variable stored so that everytime we can increment it .

jussimalinen commented 8 years ago

Maybe there could be at module level a dictionary to test names with value of the sequence id?

So something like:

SEQUENCES = {}

And for each generated sequence diagram you could add index 1 if it does not exist yet or then increase it with one:

SEQUENCES[test_name] = index 
samratashok87 commented 8 years ago

Does it have to be a static variable for the class ? Or it can be just an attribute of the class