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

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

      May 19, 2025

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 19, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 19, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 19, 2025

      My latest hands-on could be the best value AI laptop of the summer, but I still have questions

      May 19, 2025

      DOOM: The Dark Ages had the lowest Steam launch numbers in series history — Is it suffering from the ‘Game Pass Effect’?

      May 19, 2025

      Microsoft won’t be left exposed if something “catastrophic” happens to OpenAI — but may still be 3 to 6 months behind ChatGPT

      May 19, 2025

      Microsoft Copilot gets OpenAI’s GPT-4o image generation support — but maybe a day late and a dollar short for the hype?

      May 19, 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

      ES6: Set Vs Array- What and When?

      May 19, 2025
      Recent

      ES6: Set Vs Array- What and When?

      May 19, 2025

      Transform JSON into Typed Collections with Laravel’s AsCollection::of()

      May 19, 2025

      Deployer

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

      My latest hands-on could be the best value AI laptop of the summer, but I still have questions

      May 19, 2025
      Recent

      My latest hands-on could be the best value AI laptop of the summer, but I still have questions

      May 19, 2025

      DOOM: The Dark Ages had the lowest Steam launch numbers in series history — Is it suffering from the ‘Game Pass Effect’?

      May 19, 2025

      Microsoft won’t be left exposed if something “catastrophic” happens to OpenAI — but may still be 3 to 6 months behind ChatGPT

      May 19, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»CodeSOD: Enterprise Code Coverage

    CodeSOD: Enterprise Code Coverage

    December 29, 2024

    Alice has the dubious pleasure of working with SalesForce. Management wants to make sure that any code is well tested, so they’ve set a requirement that all deployed code needs 75% code coverage. Unfortunately, properly configuring a code coverage tool is too hard, so someone came up with a delightful solution: just count how many lines are in your tests and how many lines are in your code, and make sure that your tests make up 75% of the total codebase.

    Given those metrics, someone added this test:

    public void testThis() {
        int i = 0;
        i++;
        i++;
        i++;
        i++;
        i++;
    
        // snip 35,990 lines
    
        i++;
        i++;
        i++;
        i++;
    }
    

    Keep adding lines, and you could easily get close to 100% code coverage, this way. Heck, if you get close enough to round up, it’ll look like 100% code coverage.

    [Advertisement] Plan Your .NET 9 Migration with Confidence
    Your journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!

    Source: Read More 

    news
    Facebook Twitter Reddit Email Copy Link
    Previous Article16 Chrome Extensions Hacked, Exposing Over 600,000 Users to Data Theft
    Next Article Windows 11 is showing more Xbox Game Pass PC ads notifications. Turn them off

    Related Posts

    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 19, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-4915 – PHPGurukul Auto Taxi Stand Management System SQL Injection

    May 19, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Microsoft Copilot is now available in GroupMe, and will act as an assistant there

    Operating Systems

    CVE-2025-44854 – Totolink CP900 Command Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-47886 – Jenkins Cadence vManager Plugin CSRF Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    AI’s Greatest Threat? Elon Musk Sounds the Alarm on the ‘Woke Mind Virus’ – Part 1 of the Research Article

    Artificial Intelligence

    Highlights

    Development

    Mitigating Memorization in Language Models: The Goldfish Loss Approach

    June 21, 2024

    LLMs can memorize and reproduce their training data, posing significant privacy and copyright risks, especially…

    pgEdge introduces advanced logical replication features in v24.7

    August 7, 2024

    Sitecore Personalize: Initialization Error

    June 24, 2024

    GenSQL: A Generative AI System for Databases that Advances Probabilistic Programming for Integrated Tabular Data Analysis

    July 13, 2024
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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