Viz you create a state machine model of your system and feed it to a fuzzer and let it go crazy?
Any better alternatives to testing a stateful system ?
For a finite state machine, there can be only limited number of state transitions. So why can't you test all the state transitions with various inputs that feed the state transitions?
Fuzzer is usually and mostly used to test only those scenarios which you could have never thought of. It is useful in that it can be used to simulate unexpected inputs which is primarily why it is used by reverse engineers and penetration testers. But fuzzing is never a substitute for unit testing and bdd
Even for model based testing, you don't randomly generate tests. You create an abstract test suite that models the system under test and then create a concrete test suite from the abstract test suite using polymorphism and then execute this concrete test also called as an execution test suite. If you can make a state machine out of your abstract test suite, it means that the model under test is also a state machine which then means that you can test the system under test using proper state transition tests which can be covered by your unit tests itself. So model based testing won't be a great idea in this case. Model based testing is useful only in scenarios where your test cases themselves can be automated and change frequently depending on various factors. In other words, model based testing is used only in those scenarios where the test cases can themselves be algorithmically determined. One such use case for model based testing would be Reinforcement Learning models.
2^n combinations .. we already do this.. but feel it would be better to have such a framework in palace for 100% coverage of logic flow..
What do you use for bdd ? Write feature and unit tests on side ? Problem is our system is very stateful .. one change has cascading effects.. so unit tests aren't a good solution I think , especially to move fast
It's closer to RL what I'm trying to do.. but for verification not for learning..
When you use bdd, it is more at a feature testing level. It is mostly used in Agile Development like Scrum these days where the product manager feeds you stories that pretty much reflects what your BDD test does anyway. Otherwise most companies and people stick to just plain old unit tests and integration tests and leave the rest to QA team (bad idea but this is what is practically observed)
Why 2^n combinations? Does your state machine have 2^n transitions? If not, you just test the state transitions when they occur and within each state do the negative testing. There certainly won't be exponential test cases if you understand what you are testing and design your test cases in a meaningful way
It can have.. most should end in dead paths.. but it's a thing to test right? How to do negative testing?
You test all the cases where state transitions happen which is fixed because state transitions are limited. In negative testing, you test a specific state for inputs where no transition happens and in those cases you ensure that and make sure that the state machine remains in the same state and in a valid state so that further meaningful inputs can make the state machine transition to the correct state later. In negative testing, you test only a few inputs like extremes and so on. You can't possibly feed it all inputs here. Just those which your code tests against
Обсуждают сегодня