Common Errors and HTTP Status Codes When Performing Website Testing

Rating: 5.0/5. From 1 vote.
Please wait...

As we know, a client-server architecture allows making a lot of operations on the Internet. In this combination, we can distinguish 2 basic components: a client (requestor) and a server (service provider).

In this case, a client is any software connected to the network that sends requests and processes responses from a server.

Clients can be:

  1. Web browsers;
  2. Mobile software;
  3. Smart built-in home appliances;
  4. Various server applications.

A server is a virtual machine connected to the network. Its main task is to get requests, process them, and send client data in a particular format.

Servers can be:

  1. A local webserver;
  2. Any server based on HTTP;
  3. Specialized sets of server machines.
A client and a server exchange messages in the form of “request-response”. They are commonly called communication protocols.

Web browser starts a dialogue with a server based on HTTP protocol. It sends a request specifying what data it is expecting to receive. When the server gets and processes a request, it sends the browser a message (so-called HTTP response) containing requested information (usually, it’s HTML file). Such messages include data and special codes of the current state that help web browsers to define whether the incoming request was successfully processed or not.

The final result of the request processing that is always in the first line of the server’s response is called a response code or a state code of the current state. Moreover, these messages are sent whenever a web browser interacts with a server, even if the user of the site doesn’t see them.

Types of response codes

We can divide all the response codes into several classes. A state class is marked with 1 number that defines a state of a web page. Two other numbers are of a clarification nature.

There are 5 classes of the status codes:

  • 1xx – a group of information codes. Their task is to process information, make a message informing that current request is received, and transmit data.
  • 2xx – successful processing of requests. A server has already received the request and successfully processed it without any errors.
  • 3xx – redirect. This code notifies users about the current necessity to sent requests to another address if the file has been moved.
  • 4xx – client errors. These errors mean that a system didn’t find particular file at the requested address.
  • 5xx – server errors. It indicates that there was a server failure when performing the request.

To know the status code of a request in a web browser, you need to open a developer toolbar. The value of the code will be available in the “Status” column in the “Network” tab. After the console is open, you have to refresh the page.

HTTP response codes

HTTP response codes

Common Errors

HTTP Error 404

Bad request – means that request was written incorrectly (obviously, there is a syntax error in the request body). A client can try to upload a huge file. Because of this, the request can be incorrect, HTTP titles can have errors, etc.

Possible causes:

  1. Antivirus is blocking web browser performance;
  2. Windows firewall is blocking web browser performance;
  3. Incorrect configuration of a web browser;
  4. And finally, it can be poor Internet connection.

HTTP Error 403

Forbidden – current request cannot be processed due to some access restriction to requested data.

Possible causes:

  1. An error in the i-number;
  2. A server doesn’t have access to necessary information;
  3. A group of files is located in the incorrect directory.

HTTP Error 404

Not Found – common error in the Network. It indicates that a system cannot find some files at the current address. Usually, people see this error when they use so-called broken links.

Possible causes:

  1. Nonexistent URL;
  2. There are no requested files and configurations on the current server.

HTTP Error 500

Internal Server Error – there can be an unexpected situation on a server that is easily classified as other well-known network error code.

Reasons for that:

  1. A server doesn’t run a scenario;
  2. Script has a lot of errors;
  3. Incorrect syntax of the.htaccess file (the incorrect construction was written).

HTTP Error 502

Bad Gateway – a server gets a response about an error or that there is no connection from the following virtual server which it has referred to.

Possible causes:

  1. Insufficient capacities of the server’s resources;
  2. Incorrect performance of the proxy server.

HTTP Error 503

Service Temporarily Unavailable – current server unavailability that is caused by some technical issues.

Reasons for that:

  1. Firstly, a server can be overloaded;
  2. Secondly, a server may be in maintenance at the moment.

Almost every tester during everyday activities deals with different checks of requests and defects connected with it. When testing the UPL performance, a significantly important thing is a server response code, especially the one that leads to a nonexistent page (HTTP error 404).

Undoubtedly, when specialists perform testing of any program interface, they use the HTTP requests. A server, therefore, can send different codes to all the client’s requests. These codes show errors or inform the user about the current state of the server.

API (application programming interface) allows providing users with this data. The process of data exchange and the format of transferring information is fairly structured. Hence, the client and server know how they should interact.

API helps quickly find and identify such software bugs as:

  1. Incorrect data performance;
  2. Duplication or general lack of functionality;
  3. Some issues with API security;
  4. Incorrect functioning of the web security system;
  5. Incorrect structure of responses;
  6. Some issues with multithreading.

In Conclusion

Today, not only IT specialists have to understand the peculiarities and nature of HTTP errors. First of all, codes are connected with specifics of resource performance. They notify a client about the current state of a web page.

Due to the information given by any error code after user request, a server can change the data processing. In a situation when there is an error and you now the result of the request, you can solve the issue by yourself.

Additionally, we’d like to say that such a diagnostic of error code (when performing security testing) allows finding vulnerabilities in the software under test.

Leave A Comment