Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Walk on predefined edge sequences #274

Merged
merged 9 commits into from
Sep 28, 2022

Conversation

cs8azg
Copy link
Contributor

@cs8azg cs8azg commented May 27, 2021

Dear GraphWalker developers,

I recently made a fork of the project, where I implemented an additional generator and stop condition. These enable the user to define a custom edge sequence along which the software will execute the walk on the supplied graph.

My motivation for these developments was to make it possible for the user to define any edge sequence, either customized by themselves, or generated by external tools. In my opinion, this feature might help diversify the use cases of the GraphWalker project.

I implemented the feature of predefined paths by extending the JSON input model in the io module with a predefinedPathEdgeIds member. The user has to define the sequence of edge IDs in this array (of strings). This array exists similarly as a member in the graph model classes in the core module. I made a few additions in the context class by keeping a record of the current edge index during the execution process. The generator calculates the next element in the walk using the array of edges stored in the graph model and the current edge index kept by the context. The stop condition keeps track of when the walk has stepped on the target vertex of the last edge defined in the predefined path.

For these features, I wrote multiple unit tests to make sure my implementation is correct. I tested all features separately, and I tried to think of all possible situations that might occur during execution.

There are a few possible future developments for this new feature that I can suggest. One of them could be the extension of the GraphWalker Studio GUI with an input box where the user defines the predefined path. Currently it can only be defined in the JSON input model.

I hope I raised your interest with this development and that my contribution can be a part of the GraphWalker project.

Sincerely, Zsolt Csáky

@KristianKarl KristianKarl merged commit e8c2217 into GraphWalker:master Sep 28, 2022
@KristianKarl
Copy link
Contributor

Hi Zsolt,

Sorry for this very late response. I had a break from GraphWalker for a while.
I really liked your PR, and I'm happy to merge it. I believe it will be a very welcomed feature.

Very best Kristian

@ng272
Copy link

ng272 commented Sep 28, 2022

Dear Kristian,

Thank you for your answer, and to include it in GraphWalker 4.3.2 Release and in the a corresponding chapter of GraphWalker wiki.

This feature will be very useful to us when we generate some systematic test sequence for the model.

Zsolt - who made the #274 PR - was my student in university and made this PR as a part of his diplomawork in Summer 2021.

(Note that due to delay in the merge, another student - Almos - tried to use GraphWalker API for the same purpose. For GraphWalker CLI it was worked for him properly, but for GraphWalker studio it was not, so he opened this ticket: #302 )

Another topic:
You listed articles about GraphWalker in the bottom of https://graphwalker.github.io/ page.
Note that the following article about MBT has a section at the end that solve a small problem with GraphWalker. The article can be reached here, if you are interested: Gábor Árpád Németh: Teaching model-based testing. Teaching Mathematics and Computer Science. 2020/1. DOI: 10.5485/TMCS.2020.0469

Best regards,
Gábor

@KristianKarl
Copy link
Contributor

Hi Gábor,

Thank you very much for the link to your article. I have added it to the graphwalker.github.io/ page.

I will have some time today and have a look at #302

Best regards Kristian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants