microsoft/restler-fuzzer

"create_once" causes not 100% coverage for all APIs

Aberta

#830 aberto em 3 de nov. de 2023

 (1 comentário) (0 reação) (0 responsável)Python (329 forks)auto 404
enginegood first issue

Métricas do repositório

Stars
 (2.929 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Description

I need to test an internal REPL API, there are 9 APIs in it, and the resource REPL can only be created 5 times for its parent resource. Since there's no way to control how many instance of a resource to create except "create_once", "create_once" is used in my test. But this caused following coverage report:

Using python: 'python.exe' (Python 3.8.2) Request coverage (successful / total): 8 / 9 Attempted requests: 8 / 9 No bugs were found.

I checked logs, found the API to create REPL appeared in log file "network.preprocessing.704.1.txt", all other 8 APIs appeared in network log file ("network.testing.5560.1.txt"). Because all 9 APIs are invoked at least once in the test, the coverage report should show "9 / 9", i.e., 100%.

Steps to reproduce

Create a set of test APIs, one of the API to create an instance of the resource, and other APIs can check resource details, or use the resource do something. Set up "create_once" in the engine_settings.json, then run "restler.ext test ..." command, you'll see the coverage result is not 100%.

Expected results

expected coverage result is 9 / 9 (assume 9 APIs)

Actual results

the coverage result was 8 / 9.

Environment details

Windows 11, Python 3.8.2, dotnet 7.0.402, restler 9.2.2

Guia do colaborador