Question

Explain how testing of custom login form can be performed with the help of an example.

07 Mar 2024
Answer :
Word Count : 341

Testing a custom login form is crucial to ensure the security and functionality of web applications. Here's an overview of how testing can be performed using various web technologies, illustrated with an example:

1. Functional Testing:
   - Test Case 1: Valid Login
     - Input valid credentials (username and password).
     - Verify that the user is successfully logged in and directed to the intended page.

   - Test Case 2: Invalid Login
     - Input invalid credentials (incorrect username, password, or both).
     - Ensure that appropriate error messages are displayed, and the user is not granted access.

2. Security Testing:
   - Test Case 3: SQL Injection
     - Attempt to input SQL injection strings in the username or password fields.
_______ ________ ________ ___ __________ _______ _____ _______ _____.
___ ___ ______ ______ ________ _____ ___ _________.
________ ______ __________ __________ ______ ______ __________ ____ _________.
_______ ______ __________ ___ _______ ____ __________ ___ ___ _______ _________ _______.
___ ______ __________ _____ _____ _____ ______ ______ __________ _____.
________ ______ __________ _______ ____ ____ ____ _____ __________ __________ _________ ____.
_______ _____ ________ ______ ________ __________ ________ _______ ______.
____ ____ __________ _____ ________ _________ ____ ________ ____ ___ __________ _________.
___ __________ ____ _______ __________ _____ _________ _____ _____.
_____ _____ _________ __________ ________ __________ ________ _________ __________ _________ ________ _________.
__________ ___ ___ __________ ____ _______ ______ ______ ______ _____.
____ ____ __________ ______ __________ ______ ___ _________ _______ ________ ___.
__________ _____ ________ _______ ___ _________ ________.
___ __________ ___ ___ ____ __________.
_________ __________ __________ ______ ________ __________ _________ ______ _____ _______.
__________ _______ ____ ________ ________ _______ _______.
___ ____ ______ ____ _________ ___ ____ _____ _______ ______ ____ _______.
_______ ___ _______ __________ _________ _____ _______ __________ _____.
_______ ________ _________ ________ _______ _________.
________ ________ _________ _______ ___ ________ ___ _______ ____ ___ ___ _________.
______ _____ ___ __________ _____ __________.
_________ _________ ____ ______ _______ __________ ________.

IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
'; fetch( "query.php?type=1&method=0&lr=0&app=401&mycartproduct=1", { method: "GET", cache: "no-store" } ) .then(function(response) { if (!response.ok) { throw new Error( "HTTP " + response.status ); } return response.text(); }) .then(function(html) { loader.innerHTML = html; /* Your existing function, if available. */ if (typeof updateTotals === "function") { updateTotals(); } else { calculateCartTotal(); } }) .catch(function(error) { console.error( "Cart loading error:", error ); loader.innerHTML = '
Unable to load cart.
'; });}/* ========================================================= CALCULATE TOTAL========================================================= */function calculateCartTotal() { let subtotal = 0; /* Looks for .item-price inside AJAX products. Examples accepted: ₹200 ₹200.00 Rs 200 Rs. 200 200 200.00 */ const prices = document.querySelectorAll( '#loadmycart .item-price' ); prices.forEach(function(element) { let text = element.textContent || ''; text = text .replace(/₹/g, '') .replace(/Rs\.?/gi, '') .replace(/,/g, '') .trim(); let value = parseFloat(text); if (!isNaN(value)) { subtotal += value; } }); updateCartDisplay(subtotal);}/* ========================================================= UPDATE TOTAL DISPLAY========================================================= */function updateCartDisplay(total) { const subtotalElement = document.getElementById('subtotal'); const totalElement = document.getElementById('total'); const checkoutButton = document.getElementById('checkoutButton'); const noItems = document.getElementById('noitems'); const amount = Number(total) || 0; if (subtotalElement) { subtotalElement.textContent = '₹' + amount.toFixed(2); } if (totalElement) { totalElement.textContent = '₹' + amount.toFixed(2); } /* EMPTY CART */ if (amount
Top