SAP / odfuzz

Apache License 2.0
18 stars 12 forks source link

PR-Bugs issues fixing for PUT and POST requests #81

Closed prashdsouza closed 3 years ago

prashdsouza commented 3 years ago

This is the consolidated PR for resolving bugs and issues that led to Bad request from the oDATA gateway. Following services were tested to name a few

../ui?sap-language=EN&saml2=enabled&sap-ui-fesr=false#EHSTask-manageManagementOfChange ../ui?sap-language=EN&saml2=enabled&sap-ui-fesr=false#CompanyCode-deletePlanData ../ui?sap-language=EN&saml2=enabled&sap-ui-fesr=false#ProductionOrder-manageError and FioriGoat

The analysis of requests led to a good reduction of 400 or bad request errors.

The few 400 errors that remain are of type

{"error":{"code":"005056A509B11EE1B9A8FEA8DE87F78E","message":{"lang":"en","value":"Property replace not found in type TaskDefReference and /IWBEP/CM_MGW_RT/028The argument 'äÄ' cannot be interpreted as a number

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

codecov-io commented 3 years ago

Codecov Report

Merging #81 (c8f2526) into master (1086dc0) will decrease coverage by 0.10%. The diff coverage is 56.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #81      +/-   ##
==========================================
- Coverage   60.79%   60.69%   -0.11%     
==========================================
  Files          18       18              
  Lines        3497     3516      +19     
==========================================
+ Hits         2126     2134       +8     
- Misses       1371     1382      +11     
Impacted Files Coverage Δ
odfuzz/fuzzer.py 33.47% <16.66%> (-0.08%) :arrow_down:
odfuzz/generators.py 63.49% <64.51%> (-1.08%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1086dc0...c8f2526. Read the comment docs.

prashdsouza commented 3 years ago

@phanak-sap I was not able to assign you as the reviewer Please review this PR

AlapanGhosh commented 3 years ago

This is the consolidated PR for resolving bugs and issues that led to Bad request from the oDATA gateway. Following services were tested to name a few

../ui?sap-language=EN&saml2=enabled&sap-ui-fesr=false#EHSTask-manageManagementOfChange ../ui?sap-language=EN&saml2=enabled&sap-ui-fesr=false#CompanyCode-deletePlanData ../ui?sap-language=EN&saml2=enabled&sap-ui-fesr=false#ProductionOrder-manageError and FioriGoat

The analysis of requests led to a good reduction of 400 or bad request errors.

The few 400 errors that remain are of type

{"error":{"code":"005056A509B11EE1B9A8FEA8DE87F78E","message":{"lang":"en","value":"Property replace not found in type TaskDefReference and /IWBEP/CM_MGW_RT/028The argument 'äÄ' cannot be interpreted as a number

The first error occurs due to "IGNORE_METADATA_RESTRICTIONS" = True from https://github.com/SAP/odfuzz/pull/65 and is the intended behavior.

The second error is due the service defining the property as Edm.String in the metadata, and expecting only numeric characters in the string. From what I see in the metadata, there may not be any clear way of distinguishing such properties, although sap:display-format might be of help

Edit: sap:display-format="NonNegative" does indeed define the value should be a non-negative numeric string. https://wiki.scn.sap.com/wiki/display/EmTech/SAP+Annotations+for+OData+Version+2.0

phanak-sap commented 3 years ago

There is problem with the CLA agreement, since Prashanth created some commits as I043176, and this is not existing github user with signed CLA agreement. Please change the user in the commit messages and force push, or create new PR so I can merge this.