Похожие чаты

Hey guys what's your view on model based testing ?

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 ?

10 ответов

11 просмотров

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.

The prodigal-᥀ Автор вопроса
Madhu
For a finite state machine, there can be only limi...

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..

The prodigal-᥀ Автор вопроса

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

The prodigal-᥀ Автор вопроса
Madhu
Even for model based testing, you don't randomly g...

It's closer to RL what I'm trying to do.. but for verification not for learning..

The prodigal ᥀
What do you use for bdd ? Write feature and unit t...

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)

The prodigal ᥀
2^n combinations .. we already do this.. but feel ...

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

The prodigal-᥀ Автор вопроса
Madhu
Why 2^n combinations? Does your state machine have...

It can have.. most should end in dead paths.. but it's a thing to test right? How to do negative testing?

The prodigal ᥀
It can have.. most should end in dead paths.. but ...

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

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта