retest / gui-state-machine-api

API for the creation and modification of incomplete state machines which represent the exploration of a GUI application.
2 stars 1 forks source link

Ignore retestId when generating checksum from serializables SutState and Action #33

Closed tdauth closed 5 years ago

tdauth commented 5 years ago

Apparently the field Element.retestId is generated with random values and is not the same every time. We have to filter it when generating the hash value or make sure that Surili does always generate the same value.

beatngu13 commented 5 years ago

I recently created this PR on Bitbucket:

https://bitbucket.org/retest/surili/pull-requests/38/

I thought about this twice and I'm unsure if this isn't something we should "simply" do on the SUT model-side. That is, when we create the hash, we should ignore it.

What do you think?

tdauth commented 5 years ago

We can do this if there is a way to exclude the field for serialization. I have only found transient. Alternatives are to create a custom byte stream with all data except the retestId, to copy the whole SutState except the retestId in a new SutState or to create a custom state class for the monkey.

tdauth commented 5 years ago

Surili uses a FakeRetestIdProvider. Hence, the retestId will always be the same.