Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 08 10:28
    GitLab | Dorin Oltean pushed 1 commits to altwalker
  • Dec 03 2019 14:55
    GitLab | Robert Dezmerean pushed 1 commits to altwalker
  • Nov 07 2019 20:00
    GitLab | Robert Dezmerean pushed 1 commits to altwalker
  • Sep 02 2019 10:03
    GitLab | Robert Dezmerean pushed 1 commits to altwalker
  • Aug 19 2019 13:07
    GitLab | Robert Dezmerean pushed 1 commits to altwalker
Robert Dezmerean
@robert-dezmerean_gitlab

New release of altwalker (0.2.5) on PyPI.

To upgrade to the new version run pip install -U altwalker

Check out the Changelog.

Robert Dezmerean
@robert-dezmerean_gitlab

New release of the Model-Editor.

What's new:

  • Edit mode, now you can create vertices/edges or update them from the graph view
  • Models are now saved in Local Storage
  • Graph Visualizer settings for graph direction, vertex separation and edge separation
  • Json Editor settings for theme and font-size

https://altom.gitlab.io/altwalker/model-editor

Alexandru Rotaru
@alex.rotaru_gitlab
We released a new version of altwalker - 0.2.6.
We fixed some issues for the Python executor, we’ve updated the HTTP executor and fixed a couple of other bugs; more info can be found in the Changelog
Melinda Nagy
@melinda.nagy_gitlab
Hey! I have a question related to guards. If I will choose to access a guard within the tests code and I will be using a variable called let's say "data" for that as a parameter, what would happen if I will use the same variable named "data" for purposes other than the guards? Will it be overwritten?
Robert Dezmerean
@robert-dezmerean_gitlab

AltWalker will pass the current data from the model to your test method as the first parameter. After the test method was executed AltWalker will update
the data from the model to match the changes from the dict.

If you reassigned the data variable nothing will happen, you will simply lose the reference to the data dict.

But if you want to use the name data for something else you could rename the parameter.

Melinda Nagy
@melinda.nagy_gitlab
Ok @robert-dezmerean_gitlab - got it! Thanks!
Octavian Vladut
@octavian.vladut_gitlab
Hey guys! I'd like to start a run that would use 2 models (2 jsons). Is it possible to do so? Could you please give an example of a command that allows that? I tried something like <<altwalker online -m models/default.json -m models/default2.json "quick_random(edge_coverage(100))" tests>> without success. Thanks!
Robert Dezmerean
@robert-dezmerean_gitlab
Hi! You should specify a generator and stop condition for every model: altwalker online -m model/default.json "random(never)" -m models/default2.json "quick_random(vertex_coverage(100))"
Octavian Vladut
@octavian.vladut_gitlab
That works, thanks alot @robert-dezmerean_gitlab !
DmytroCh
@DmytroCh
Hi Guys! Are there any examples of API testing with MBT? Like https://altom.gitlab.io/altwalker/altwalker/examples/python/e-commerce-demo.html in case of web sites?
Dorin
@dorinoltean
Hey, we currently don't have an example for API testing published. We worked on a project where we modeled the API using MBT. Speed of executing tests was the main benefit of testing directly the api, since you don't have to wait for UI interactions.
To design your model for API testing you can start by putting the write calls in the edges, and the read calls in the vertices. When you read your data in the vertices you assert the values.
You can use python requests library to call your api https://realpython.com/python-requests/ .
Octavian Vladut
@octavian.vladut_gitlab
hey guys! Is there a possibility to temporary block specific edges/vertices on the model for debugging purposes such as we could force the model to reach the desired vertex faster?
Robert Dezmerean
@robert-dezmerean_gitlab

Hi. You can mark vertices as blocked:

"properties": {
    "blocked":  true
}

To filtered out the blocked vertices add the --blocked option to altwalker online command.

You can also run the tests with a_star(reached_edge(e_name)) or a_star(reached_vertex(v_name)), which will run the shortest path to a specific vertex or edge.
Octavian Vladut
@octavian.vladut_gitlab
Thank you @robert-dezmerean_gitlab !
Robert Dezmerean
@robert-dezmerean_gitlab
If you have a more specific path that needs to pass through more elements from your model you can chain two or more a_start generators:
a_star(reached_edge(e_name)) a_star(reached_vertex(v_name))
Octavian Vladut
@octavian.vladut_gitlab
Hey guys!
image.png
What should be the format of the weight added on edges? I tried with the following but there is no mention of it on the model. Is there something I'm setting wrong?
Robert Dezmerean
@robert-dezmerean_gitlab
Hi!
The model-editor doesn't display the weights, but that's the correct format.
https://altom.gitlab.io/altwalker/altwalker/modeling.html#json
Octavian Vladut
@octavian.vladut_gitlab
Thanks, I've been looking into it and updated the model as shown in the screenshot. However now I have an error thrown while running the tests:
GraphWalker Error: GraphWalker responded with the error: org.graphwalker.core.machine.MachineException: Could not calculate which weighted edge to choose from vertex: <vertexName>
should I have the sum of all weights that exit from the vertex equal to 1? Meaning that I can't just set 0.1 for one of the edges to deprioritize it?
Robert Dezmerean
@robert-dezmerean_gitlab
It should work if you set 0.1 for one edge. I'm looking into it.
Robert Dezmerean
@robert-dezmerean_gitlab
weight-error.png
I made a simple example where I got two edges one with a low weight and one with a guard set to be always false and I get the same error.
  • eadge_A has a weight of 0.1
  • eadge_B has a guard that is set to false.
GraphWalker Error: GraphWalker responded with the error: org.graphwalker.core.machine.MachineException: Could not calculate which weighted edge to choose from vertex: vertex_A'.
Octavian Vladut
@octavian.vladut_gitlab
I had indeed a guard set for the 2nd edge getting out of the vertex where I had no weight. However if this is the case, shouldn't graphwalker go on the weighted edge (even though it's set to 0.1) since the other one is blocked by a guard?
Robert Dezmerean
@robert-dezmerean_gitlab
simple-weight-error.png

It should. I tried a simpler example where I got only one edge with a low weight and I get the same error.

  • edge_B has a weight of 0.5

And the tests fail half of the time.

Octavian Vladut
@octavian.vladut_gitlab
Cool, thanks for investigating @robert-dezmerean_gitlab . I will look for a workaround!