microsoft/restler-fuzzer

"create_once" causes not 100% coverage for all APIs

開放

#830 建立於 2023年11月3日

 (1 則留言) (0 個反應) (0 位負責人)Python (329 個分叉)auto 404
enginegood first issue

倉庫指標

星標
 (2,929 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南