Console Logs

Console Logs Overview

The Console Logs in Functionize provide insight into critical JavaScript errors, warnings, and other console outputs. These logs focus specifically on issues that impact your tests, such as blocked resources or CORS problems. They allow you to pinpoint client-side errors with precision, enabling you to address these issues directly.

Benefits of Console Logs

  1. Targeted Troubleshooting:

    • By focusing only on relevant information, console logs prevent information overload and allow you to focus on the actual problems, making the debugging process more manageable.
  2. Contextual Error Information:

    • Each log is linked to a specific test step, providing a clear picture of what went wrong at the moment of failure. This level of detail is invaluable for understanding the exact scenario leading to the error, helping you make informed decisions quickly.
  3. Actionable Insights:

    • With detailed information at your fingertips, you can take immediate action. For example, if a JavaScript error appears, you can review and correct the problematic code or resource. If a CORS error is detected, you can check the request by a web page or application to the domain.

Access to Console Logs

To access console logs:

  1. Open the Browser Results Tab:

    • Navigate to the Test Details page with a completed execution.
  2. View Results:

    • Click the View Result button or click the View button to the right of any action.
  3. Access Console Logs:

    • Click the Console tab to view the console log.

Console Errors

Console errors are typically related to issues within the web application itself. Here’s a list of common console errors and their resolutions:

JavaScript Syntax Error

  • Description: An error in the syntax of the JavaScript code.
  • Resolution: Check the JavaScript code for syntax errors and fix them.

JavaScript Reference Error

  • Description: Trying to reference a variable that is not declared.
  • Resolution: Ensure that all variables are properly declared before use.

JavaScript Type Error

  • Description: An operation is performed on a value of the wrong type.
  • Resolution: Check the types of variables and ensure they are used correctly.

JavaScript Range Error

  • Description: A numeric value is outside the acceptable range.
  • Resolution: Ensure that numeric values are within the expected range.

CORS Error

  • Description: Cross-Origin Resource Sharing (CORS) error occurs when a web application makes a request to a different domain than the one that served the web page.
  • Resolution: Configure the server to include the correct CORS headers.

Network Error (fetch)

  • Description: An error occurred while trying to fetch a resource.
  • Resolution: Check the network connectivity and the URL of the resource.

Blocked Resource Error

  • Description: A resource is blocked due to security settings.
  • Resolution: Adjust the security settings to allow the resource.

API Call Failure

  • Description: An API endpoint returns errors or fails to execute properly.
  • Resolution: Check the API endpoint, ensure it is correct, and that the server is up and running.

By leveraging console logs in Functionize, testers can effectively troubleshoot and resolve client-side errors, ensuring smoother and more reliable test executions.