OzFramework / oz

Oz is a behavioral web-ui testing framework developed to reduce test maintenance by using a predictive model rather than a scriptive model when writing tests.
Apache License 2.0
23 stars 7 forks source link

WIP: create a routing path object that manages routes #176

Closed Castone22 closed 5 years ago

Castone22 commented 5 years ago

configure router to use this object allow the current route path to be accessed from core_world follow new interface in proceed to

This is functionally compatible with route recalculation as well

resolves #175

Needs unit tests

Castone22 commented 5 years ago

This change also relies on some logic introduced in route recalculation, so i'm rebasing it to that branch.

As such, closes #168

PanoramicPanda commented 5 years ago

Haven't had a change to pull it down and look yet, but how does this affect the creation of the page_graph.dot?

Castone22 commented 5 years ago

No impact.

The routes that you can insert must have been defined on the page that they're being inserted against. (using add_route)

At some point i also intend to add the ability to dynamically define a route that you're inserting, something like

@world.current_route.insert_page(SomePage, using_route: [[:visit, :arg1, :arg2], :param])

The current way the dot graph is generated wouldn't be able to account for anonymous routes like this though.

PanoramicPanda commented 5 years ago

So, a route would still be declared via add_route... what's the insert_route actually doing then?

Castone22 commented 5 years ago

It sets the next page the router will navigate to in your flow

PanoramicPanda commented 5 years ago

Okay, so it forces what the next page actually is, yes? Just making sure I'm getting this right.

Castone22 commented 5 years ago

Yes, great when you have pages that conditionally show up based on selections.

Castone22 commented 5 years ago

At some point we're going to get to the point where you feed oz a bunch of different data and tell it to get to each page at the end of a flow lol. Perhaps just have like 90 randomly generated datasets per execution and have it basically do an exploratory test 90 times

Might be kinda cool to just have a mode that oz runs in where it picks a random page you've got defined, chooses some data based on constraints you wrote (including where to source said data from) and then it tries to navigate to that page and verifies that its content was correct.