Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 15, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 15, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 15, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 15, 2025

      Intel’s latest Arc graphics driver is ready for DOOM: The Dark Ages, launching for Premium Edition owners on PC today

      May 15, 2025

      NVIDIA’s drivers are causing big problems for DOOM: The Dark Ages, but some fixes are available

      May 15, 2025

      Capcom breaks all-time profit records with 10% income growth after Monster Hunter Wilds sold over 10 million copies in a month

      May 15, 2025

      Microsoft plans to lay off 3% of its workforce, reportedly targeting management cuts as it changes to fit a “dynamic marketplace”

      May 15, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      A cross-platform Markdown note-taking application

      May 15, 2025
      Recent

      A cross-platform Markdown note-taking application

      May 15, 2025

      AI Assistant Demo & Tips for Enterprise Projects

      May 15, 2025

      Celebrating Global Accessibility Awareness Day (GAAD)

      May 15, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Intel’s latest Arc graphics driver is ready for DOOM: The Dark Ages, launching for Premium Edition owners on PC today

      May 15, 2025
      Recent

      Intel’s latest Arc graphics driver is ready for DOOM: The Dark Ages, launching for Premium Edition owners on PC today

      May 15, 2025

      NVIDIA’s drivers are causing big problems for DOOM: The Dark Ages, but some fixes are available

      May 15, 2025

      Capcom breaks all-time profit records with 10% income growth after Monster Hunter Wilds sold over 10 million copies in a month

      May 15, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Test cases stop execution for next test cases after using soft assertion

    Test cases stop execution for next test cases after using soft assertion

    July 26, 2024

    I have used soft assertion in my test cases, but it stops the execution of all the next test cases. what I know if we are adding soft assertion then particular test case should fail and it should jump to the next test case successfully. Below is

    my code:

    public static boolean verifySelectEquipmentDivision1(){
    try{
    int count=0;
    String[] eqipDiv={“A”,”A&B”,”CE”};
    WebElement eqipDivdDropdown=Driver.getDriver().findElement(By.xpath(PageUtility.SELECT_EQUIPMENT_DIVISION));
    Select selectTimePeriod=new Select(eqipDivdDropdown);

    List<WebElement> eqipDivOptions=selectTimePeriod.getOptions();
    for(WebElement we:eqipDivOptions){
    for(int i=0;i<eqipDiv.length;i++){
    if(we.getText().equalsIgnoreCase(eqipDiv[i])){
    count++;
    }
    }
    }

    if(count==eqipDiv.length){
    System.out.println(“matched”);
    }
    else{
    System.out.println(“not matched”);
    }
    }

    catch(Exception e){
    System.out.println(“not selected”);

    }
    return false;

    }

    If am not adding assertAll(); it successfully execute my test cases, but to show this test case fail, I have added asserall() method and it stop execution of next test cases;

    public void verifyEqiDiv()
    SoftAssert ssoftassert=new SoftAssert();

    @Test
    softAssert.assertTrue(CommonAssertion.verifySelectEquipmentDivision1(), “selected eqip div not found”);
    // softAssert.assertAll();
    createNewReport.selectEquipmentDivision();

    }

    Source: Read More

    Hostinger
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleIssue in displaying webpage in IE11 in selenium webdriver
    Next Article How can we run only selected testcases from extent.html report in selenium webdriver?

    Related Posts

    Development

    February 2025 Baseline monthly digest

    May 15, 2025
    Artificial Intelligence

    Markus Buehler receives 2025 Washington Award

    May 15, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Building RESTful APIs with Node.js and Express

    Development

    Designer Spotlight: Jhosue Mesias

    News & Updates

    North Korean Cyber Fraud Scheme Targets U.S. Firms, DOJ Indicts Five Individuals

    Development

    Sitecore Symposium 2024: Day Two Recap

    Development

    Highlights

    Mobian – Debian derivative for mobile devices

    January 7, 2025

    Mobian is a Debian-based distro intended for smartphones and other mobile devices. The post Mobian…

    CVE-2025-46398 – Fig2Dev Stack Overflow Vulnerability

    April 23, 2025

    How to add alt text to images on Bluesky (and why you should)

    December 30, 2024

    Clair Obscur: Expedition 33 is an Xbox Game Pass triumph that expertly weaves two RPG genres together, and I’m into it

    April 23, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.