Skip to content

Commit 54dc949

Browse files
committed
added fault documentation
1 parent 90b2397 commit 54dc949

2 files changed

Lines changed: 21 additions & 5 deletions

File tree

src/main/java/com/webfuzzing/commons/faults/DefinedFaultCategory.java

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,28 @@ public enum DefinedFaultCategory implements FaultCategory {
1212
code label are still up to discussion and re-arrangement...
1313
*/
1414

15-
//1xx: HTTP
15+
// 1xx: Base
16+
// might keep other 2xx,...,8xx for other groups (eg, security, GraphQL, RPC)
17+
// 9xx is reserved for custom codes
1618

1719
HTTP_STATUS_500(100, "HTTP Status 500", "causes500_internalServerError",
18-
"TODO"),
20+
"The HTTP status code 500 represents a 'Server Error'." +
21+
" Typically, when there is crash in the business logic of the tested backend, like for example due to" +
22+
" a null-pointer exception, the server would not crash, but rather return a response with status code 500." +
23+
" Therefore, the presence of such a response 'might' indicate the presence of a fault in the backend." +
24+
" However, such code might also be used for other cases that have nothing to do with software faults." +
25+
" For example, if a request cannot be handled due to issue with the environment, e.g., databases and " +
26+
" communications with other APIs, a status code 500 could be sent." +
27+
" As such, although there is high chances that a 500 status code might point to the presence of a" +
28+
" software fault in the tested application, they still need to be manually checked due to possible 'false-positive'."),
29+
1930
SCHEMA_INVALID_RESPONSE(101, "Received A Response From API That Is Not Valid According To Its Schema", "returnsSchemaInvalidResponse",
20-
"TODO"),
31+
"A schema, like for example OpenAPI for REST, defines the structures not only of the inputs but" +
32+
" also the outputs of the API." +
33+
" If what returned by an API is not conforming to its schema, then it is a clear fault." +
34+
" However, whether the fault is in the API (i.e., it does not conform to the schema) or in the schema" +
35+
" itself (i.e., it is underspecified, or having mistakes) is something that cannot be known for" +
36+
" sure without debugging the issue."),
2137

2238

2339
;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[ {
22
"code" : 100,
33
"testCaseLabel" : "causes500_internalServerError",
4-
"fullDescription" : "TODO",
4+
"fullDescription" : "The HTTP status code 500 represents a 'Server Error'. Typically, when there is crash in the business logic of the tested backend, like for example due to a null-pointer exception, the server would not crash, but rather return a response with status code 500. Therefore, the presence of such a response 'might' indicate the presence of a fault in the backend. However, such code might also be used for other cases that have nothing to do with software faults. For example, if a request cannot be handled due to issue with the environment, e.g., databases and communications with other APIs, a status code 500 could be sent. As such, although there is high chances that a 500 status code might point to the presence of a software fault in the tested application, they still need to be manually checked due to possible 'false-positive'.",
55
"descriptiveName" : "HTTP Status 500",
66
"label" : "F100:HTTP Status 500"
77
}, {
88
"code" : 101,
99
"testCaseLabel" : "returnsSchemaInvalidResponse",
10-
"fullDescription" : "TODO",
10+
"fullDescription" : "A schema, like for example OpenAPI for REST, defines the structures not only of the inputs but also the outputs of the API. If what returned by an API is not conforming to its schema, then it is a clear fault. However, whether the fault is in the API (i.e., it does not conform to the schema) or in the schema itself (i.e., it is underspecified, or having mistakes) is something that cannot be known for sure without debugging the issue.",
1111
"descriptiveName" : "Received A Response From API That Is Not Valid According To Its Schema",
1212
"label" : "F101:Received A Response From API That Is Not Valid According To Its Schema"
1313
} ]

0 commit comments

Comments
 (0)