Inno 3.11 Testing Flashcards
(20 cards)
What is unit testing and what does it verify?
Unit testing focuses on verifying the smallest testable parts of an application, typically individual methods or classes. The goal is to ensure that each unit behaves as expected in isolation. Dependencies are usually mocked to avoid side effects and external interactions.
Unit tests are fast, deterministic, and provide confidence in logic correctness. Frameworks like xUnit, NUnit, or MSTest are commonly used in .NET.
VERYFYING SMALLEST TESTABLE PARTS OF APP
EACH UNIT BEHAVES AS EXPECTED IN ISLOATION
What is integration testing and what does it cover?
Integration testing verifies that multiple components or systems work correctly together. It tests interactions between modules, such as services, databases, or APIs. Unlike unit tests, integration tests often require real infrastructure (e.g., an actual database). These tests are slower and more complex, but they catch issues related to configuration, serialization, or service communication. They ensure that the integrated system works as expected under realistic conditions.
MULTIPLE COMPONENTS WORKS TOGETHER
OFTEN REQUIRE REAL INFRASTRUCTURE
What is functional testing and how is it different from unit or integration tests?
Functional testing verifies that the software behaves according to business requirements, often treating it as a black box. It checks whether features like login, data submission, or business workflows perform as specified. These tests may span UI, APIs, and databases, depending on the scope. Unlike unit tests, functional tests focus on user-observable outcomes, not internal logic.
Tools like Postman, Selenium, or Playwright can be used for this purpose.
SOFTWARE BEHAVES ACCORDING TO BUSINESS REQUREMENTS
TESTS LOGIN/DATA SUBMISSION/ BUSINESS WORKFLOW
FOCUS ON USER OBSERVABLE OUTCOME
What is performance testing and when should it be used?
Performance testing evaluates how the system behaves under load, stress, or heavy usage conditions. It measures metrics such as response time, throughput, memory usage, and scalability. It helps identify bottlenecks and ensures the app can handle production demands. Types include load testing, stress testing, and soak testing. Tools like Apache JMeter, k6, or Visual Studio Load Test are commonly used.
HOW BEHAVES UNDER LOAD, STRESS, HEAVY USAGE
MEASURES RESPONSE TIMES, MEMORY USAGE, SCALABILITY
IDENTIFY BOTTLENECKS
What is security testing and what vulnerabilities does it target?
Security testing ensures that the application is resilient against threats like data breaches, injection attacks, CSRF, XSS, and authentication flaws. It validates user access control, encryption, and secure data handling. Both automated (e.g., static code analysis, vulnerability scanners) and manual penetration testing are used.
OWASP Top 10 serves as a guideline for common vulnerabilities. It’s vital for applications handling sensitive or personal data.
RESILIENT AGAINST THREATS LIKE DATA BREACHES< CSRF, XDD
VALUDATES USER ACCESS CONTROL, ENCRYPTION
What is UI testing and what are its challenges?
UI testing (also known as end-to-end or system testing) verifies the user interface’s behavior from the user’s perspective. It simulates real user interactions like clicks, typing, and navigation to ensure the UI works correctly. Tools like Selenium, Cypress, or Playwright can automate these actions. UI tests are brittle due to DOM changes and are slower than other tests. They are essential for catching regressions in user-facing functionality.
VERIFIES USERS INTERFACE BEHAVIOR, SIMULATES REAL USER INTERACTIONS
What is quality control in software development?
Quality control (QC) focuses on identifying defects in the product by testing the final output. It ensures the product meets the specified requirements and standards. QC activities include testing, inspections, and code reviews. It differs from quality assurance, which aims to improve the processes used to create the product. QC is reactive — it detects issues after they occur.
TESTING THE FINAL OUTPUT
What are software quality metrics and how are they used?
Quality metrics are measurable indicators that help assess the health, maintainability, and performance of software. Examples include code coverage, defect density, cyclomatic complexity, MTTR (Mean Time to Repair), and test pass rate. These metrics guide decision-making, identify technical debt, and support process improvement. However, they must be interpreted wisely — high test coverage doesn’t guarantee good tests, for example. The right balance of metrics reflects both technical and business perspectives.
MEASURABLE INDICATORS TO ASSES THE HEALTH, MAINTAINABILITY
What is load testing and why is it important?
Load testing evaluates how a system performs under expected user load. It simulates multiple users or requests to ensure the application responds quickly and functions correctly at scale. The goal is to identify performance bottlenecks before users encounter them in production. For example, simulating 1,000 concurrent users accessing an e-commerce site during a sale. Load testing tools include Apache JMeter, k6, and Visual Studio Test.
HOW PERFORMS UNDER HEAVY LOAD, SIMULATES MULTIPLE USERS
What is stress testing and how is it different from load testing?
Stress testing pushes a system beyond its normal capacity limits to evaluate how it behaves under extreme conditions. It helps identify the application’s breaking point and how it recovers from failure.
Unlike load testing (which tests expected usage), stress testing shows how the system handles spikes or denial-of-service-like scenarios. It’s useful for ensuring graceful degradation under pressure. For example, flooding a web app with 10x the expected users in a short burst.
HOW IT PERFORMS UNDER EXTREME CONDITIONS
AND IN DENILE OF SERVICE SPIKES
What is soak testing and when should you use it?
Soak testing (also known as endurance testing) checks how a system performs over a prolonged period under a moderate load. It helps uncover issues like memory leaks, database connection exhaustion, or performance degradation over time. The test may last several hours or even days to simulate real-world usage patterns. It’s valuable for applications with long-running sessions, such as streaming services or enterprise tools. Soak testing ensures the system remains stable over time, not just under short bursts.
HOW IT PERFORMS UNDER PROLONGED PERIOD UNDER A MODERATE LOAD
What is Behavior-Driven Development (BDD) and what tools support it?
BDD is a testing approach where scenarios are written in natural language (Given-When-Then) to describe expected behavior. It encourages collaboration between developers, testers, and business stakeholders. In .NET, SpecFlow is a popular BDD tool that integrates with test frameworks and parses .feature files into test code. BDD promotes clarity and traceability by linking tests to business rules. Tools like Cucumber and Gherkin are widely used in other ecosystems.
TEST SCENARIOS ARE WRITTEN IN NATURAL LANGUANGE
What are key performance metrics in performance testing?
Core performance metrics include response time, throughput, concurrent users, latency, error rate, and resource usage (CPU, memory, I/O). These metrics help assess if the system can handle expected load efficiently. Load and stress tests are designed to monitor how these values change under pressure. Poor metrics often guide optimization efforts in the code or infrastructure. Monitoring tools like Application Insights or Prometheus can complement these tests.
REPONSE TIME, THROUGHPUT, CONCURRENT USERS, LATENCY, ERROR RATE, RESOURCE USAGE
IF THE SYSTEM CAN HANDLE LOAD EFFICIENTLY
What tools are used for load testing and performance validation?
Popular tools include k6 (JavaScript-based and scriptable), NBomber (.NET-native), and Apache JMeter (Java-based and GUI-driven). These tools simulate multiple users and measure system behavior under load.
Each has different strengths — k6 is great for integration with CI/CD, NBomber suits .NET-heavy stacks, and JMeter supports complex protocol testing. The output includes metrics like request time, errors, and throughput. Test results often drive scaling and tuning decisions.
What is a test automation strategy and why is it important?
A test automation strategy defines the scope, tools, and goals of automated testing across the development lifecycle. It identifies which layers (unit, API, UI) should be automated and how to prioritize them.
A good strategy improves coverage, reduces regression costs, and integrates tightly with development pipelines. It also outlines responsibilities, environments, and maintenance plans. A balanced approach avoids over-automating low-value scenarios.
WHICH LAYERS SHOULD BE AUTOMATED AND HOW TO PRIORITIZE IT
What are test reporting tools like Allure and ReportUnit?
Allure is a test report framework that aggregates test results into visual, interactive dashboards. It supports multiple test runners and displays metadata like steps, attachments, and logs.
ReportUnit is a .NET-friendly tool that converts test output (e.g., from xUnit, NUnit) into HTML reports. These tools improve traceability, stakeholder communication, and debugging after CI runs. Integrating them into pipelines gives teams a clear view of test health.
What are the basics of UI testing and how can you ensure stability?
UI testing validates the user interface by simulating real interactions, such as clicking buttons and filling forms. Tools like Selenium, Playwright, and Puppeteer automate these actions across browsers. Maintaining stability requires handling dynamic elements, delayed rendering, and using robust selectors (like data-test attributes). Waiting strategies (e.g., explicit waits) reduce flakiness. Running tests on headless browsers or containers ensures consistency.
SIMULATES REAL INTERACTIONS- BUTTON CLICKING, FORM FILLING
What are code coverage tools and why are they useful?
Code coverage tools analyze which parts of your source code were executed during testing. In .NET, Coverlet, JetBrains dotCover, and SonarQube are commonly used. They report metrics like line, branch, and condition coverage. High coverage can suggest good test breadth, but doesn’t guarantee depth or quality. Coverage tools help identify untested code paths and guide developers to improve test completeness.
What is mutation testing and what does Stryker.NET do?
Mutation testing introduces small changes (mutants) to your codebase and checks if your tests catch them. If tests pass despite the mutation, it indicates weak test coverage or logic. Stryker.NET is a tool that automates mutation testing for C# projects. It supports various mutation operators like negating conditions or changing return values. This approach strengthens confidence in test robustness beyond traditional coverage metrics.
INTRODUCES SMALL CHANGES TO THE CODEBASE AND CHECK IS TEST CATCH THEM
What is Shift Left Testing and why is it important?
Shift Left Testing means starting testing activities as early as possible in the software development lifecycle. It emphasizes writing unit and integration tests during development, not after. Early testing catches defects sooner, reduces costs, and speeds up delivery. It promotes developer responsibility for quality and encourages test-first practices like TDD. Shift Left is a key principle in DevOps and continuous delivery pipelines.
STARTING TEST AS EARLY AS POSSBILE
DEFECTS SOONER