As a personal easter project I'm trying to implement some model-based testing at work. I've got a graph implemented in python and I need to traverse all edges / do all transitions of the graph, at least once. Traversing an edge twice or more does not matter, but I need to start and end in the same node and get a sequence of edges/transitions back.
Simpler algorithm > shortest sequence.
I've looked around and found a lot of algorithms, but I couldn't find one / a combination that works for me. It would be great if someone could point me in the right direction or give me some tips on how to do this.
My graph implementation looks like this:
graph = {
A : {'IDLE': 't8', 'B': 't2', 'C': 't4'},
B : {'A': 't3', 'C': 't4', 'IDLE': 't6'},
C : {'A': 't5', 'IDLE': 't7', 'B': 't2'},
IDLE : {'A': 't1'}
}