STQAPRACTICALPROGRAM
STQAPRACTICALPROGRAM
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
--------------------------------------
Conduct load testing to assess the website's performance under expected user load.
Evaluate response times for critical functions.
Check for scalability issues.
Security Testing:
-----------------------------------------------------------------------------------
-------------------------------------------------------
2. User Login:
a. Test successful login with valid credentials.
b. Verify the visibility of error messages for invalid login attempts.
c. Check for the "Forgot Password" functionality and reset password process.
d. Test session persistence after login, even after closing and reopening the
browser.
4. Product Details:
a. Verify that clicking on a product displays its details.
b. Test the accuracy of product information (price, description, specifications).
c. Check if the "Add to Cart" button works as expected.
d. Test the visibility of related products and recommendations.
5. Shopping Cart:
a. Add products to the shopping cart and verify the cart's total price.
b. Test the ability to update the quantity of items in the cart.
c. Verify the removal of items from the cart.
d. Check for proper handling of out-of-stock items.
e. Test the "Continue Shopping" and "Proceed to Checkout" buttons.
6. Checkout Process:
a. Test the selection of shipping methods and costs.
b. Verify that users can enter billing and shipping information.
c. Test different payment methods (credit card, PayPal, etc.).
d. Check for the application of discounts and coupons.
e. Verify the order confirmation page and email notifications.
8. Security Testing:
a. Test for SSL encryption on sensitive pages (login, checkout).
b. Check for secure storage of user passwords.
c. Verify that sensitive information is not exposed in URLs or error messages.
d. Test session timeout and reauthentication.
9. Performance Testing:
a. Verify the loading time of key pages, especially the homepage and product pages.
b. Test the website's performance under different network conditions.
c. Check for smooth handling of concurrent user sessions.
d. Perform stress testing to assess the system's response to a high number of
simultaneous users.
-----------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Write down a testing program for the testing of a open source website and to
search a keyword on the website and display its output:
package sampleapp;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Javatpoint {
public static void main(String[] args)
{
System.setProperty("webdriver.chrome.driver","C:\\Users\\exam\\
Downloads\\chromedriver-win64
(3)\\chromedriver-win64\\chromedriver.exe");
WebDriver driver =new ChromeDriver();
driver.navigate().to("https://www.javatpoint.com/");
driver.manage().window().maximize();
JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("scrollBy(0,5000)");
driver.findElement(By.linkText("Java")).click();
}
}
Write program for launching a website and it should be redirected to log in page
and should be successfully logged in with valid input of credentials :
package sampleapp;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Test2
{
WebDriver driver;
public void driverseting()
{
driver=new ChromeDriver();
driver.manage().window().maximize();
try
{
Thread.sleep(1000);
} catch (InterruptedException e){
e.printStackTrace();
}
}
public void navigate()
{
driver.get("https://www.linkedin.com/authwall?
trk=qf&original_referer=https://www.google.com/&sessionR
edirect=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Fin.linkedin.com%2F");
try {
Thread.sleep(1000);
} catch (InterruptedException e){
e.printStackTrace();
}
driver.findElement(By.name("email-or-
phone")).sendKeys("[email protected]");
driver.findElement(By.name("password")).sendKeys("123456mik");
driver.findElement(By.id("join-form-submit")).click();
}
public static void main(String[] args)
{
Test2 obj=new Test2();
obj.driverseting();
obj.navigate();
}
}
package sampleapp;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class one
{
public static void main(String[] args)
{
System.setProperty("webdriver.chrome.driver", "C:\\Users\\exam\\
Downloads\\chromedriver-win64
(3)\\chromedriver-win64\\chromedriver.exe");
WebDriver driver =new ChromeDriver();
driver.get("https://www.cricbuzz.com/");
}
}