Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow string properties to be fuzzed with non-string types #20

Closed
marina-p opened this issue Oct 27, 2020 · 0 comments · Fixed by #40
Closed

allow string properties to be fuzzed with non-string types #20

marina-p opened this issue Oct 27, 2020 · 0 comments · Fixed by #40
Assignees
Labels
enhancement New feature or request

Comments

@marina-p
Copy link
Contributor

marina-p commented Oct 27, 2020

Currently, RESTler hard-codes quotes in the grammar around properties/parameters of string types. This constraint should be removed so it can pass values of any type for string parameters.

Current behavior for string property
Grammar.json:

    primitives.restler_static_string('"'),
    primitives.restler_fuzzable_string("fuzzstring"),
    primitives.restler_static_string("""",

fuzzing dictionary:
"restler_fuzzable_string" : ["a", "b", "c"]

After this improvement:
grammar.json:

    primitives.restler_fuzzable_string("fuzzstring"),

dictionary:

"restler_fuzzable_string" : ["a", "b", "c"] <-- the engine will add quotes around these values

"restler_fuzzable_raw_string": ["1", "2", "3.5", "null"] <--the engine will not add quotes around these values

Make sure the documentation is updated as part of this PR.

@rifiles rifiles self-assigned this Oct 27, 2020
marina-p added a commit that referenced this issue Oct 28, 2020
rifiles pushed a commit that referenced this issue Oct 29, 2020
rifiles pushed a commit that referenced this issue Oct 29, 2020
rifiles pushed a commit that referenced this issue Oct 30, 2020
rifiles pushed a commit that referenced this issue Nov 4, 2020
@marina-p marina-p added the enhancement New feature or request label Nov 5, 2020
marina-p pushed a commit that referenced this issue Nov 6, 2020
implementation

fixes

fixes
rifiles pushed a commit that referenced this issue Nov 6, 2020
rifiles pushed a commit that referenced this issue Nov 6, 2020
marina-p pushed a commit that referenced this issue Nov 7, 2020
- Modify the grammar to include a 'quoted' parameter instead of hard-coded quoting for string types.
rifiles added a commit that referenced this issue Nov 9, 2020
* Compiler changes for #20.

* Added fuzzable raw types to engine

* Updated test dicts to use raw types

* Updated to allow quoted and unquoted primitives

* Updated test grammars and fixed per endpoint candidate values bug

* Updated unit test logs

* Revert "Compiler changes for #20."

This reverts commit 0ce449e.

* Added tokens to primitive payload types

* Cleaned up primitives file after code review

* Added catch for unsupported primitives exception to restler.py

* Code review updates
marina-p pushed a commit that referenced this issue Nov 9, 2020
- Modify the grammar to include a 'quoted' parameter instead of hard-coded quoting for string types.
- Refactoring to clarify which types are part of the python code generator and which types are required for the grammar.
rifiles pushed a commit that referenced this issue Nov 11, 2020
- Modify the grammar to include a 'quoted' parameter instead of hard-coded quoting for string types.
- Refactoring to clarify which types are part of the python code generator and which types are required for the grammar.
marina-p added a commit that referenced this issue Nov 11, 2020
* Compiler changes for #20.

- Modify the grammar to include a 'quoted' parameter instead of hard-coded quoting for string types.
- Refactoring to clarify which types are part of the python code generator and which types are required for the grammar.

* Grammar improvement for custom payload.

* Updated schema parsing to handle new custom payload format. Added 'quoted' handling to request params and body schema. Fixed custom payload lookup in payload body checker.

* Added updated engine functional test logs

Co-authored-by: rifiles <v-rifile@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants