challenges2 Flashcards
Define the SonarCloud issue categories: π Bugs, π Vulnerabilities, π‘ Security Hotspots and β’ Code Smells.
bugs = bugs are errors in the code that cause it to function incorrectly or lead to uninteded behavior
vulnerabilities = vulnerabilities are weaknesses in the code that could be exploited by attackers to compromise the security of the system
security hotspot = security hotspots are pieces of codes that require a manual review to determine if they pose a security risk
code smells = code smells are indicators of poor coding practices that may not immediately affect functionality but can make the codebase harder to maintain, understand and evolve
Explain what a Quality Gate is and how it helps you monitor the quality and security of your code.
A Quality Gate is a set of conditions or criteria that a software project must meet to be considered ready for release
Describe what Selenium is what what role it fill in the DevOps Lifecycle.
Selenium is an open-source tool primarily used for automating web browsers. It provides a framework for testing web applications across different browsers and platforms.
It fills the role of βtestβ in the devops lifecycle
Describe what a WebDriver is.
A WebDriver is a software framework used for automated testing of web applications across different browsers. It provides a way to control a web browser programmatically, allowing testers and developers to simulate user interactions with web pages, such as clicking buttons, entering text into forms, and navigating between pages.
How the assert()
function in Python can be combined with Selenium scripts to create tests.
You can combine the assert statement with Selenium scripts to create automated tests that check specific conditions or values on a web page
How Selenium works to select components of a website.
Selenium provides a range of methods to locate elements on a webpage. These include finding elements by ID, name, CSS selector, class name, tag name,β¦
You can use these locators to identify specific HTML elements on the webpage you want to interact with, such as buttons, input fields, links, etc.
Explain what depends-on:
does in a Docker Compose file and how it is useful
The depends_on option in a Docker Compose file is used to define dependencies between services. It ensures that certain services are started before others.
Describe which ways you can send alert messages using handlers in the Python ``logging` module
StreamHandler = sends logging output to streams such as sys.stdout or sys.stderr
fileHandler = sends logging output to a file
rotatingFileHandler = writes log messages to a set of files, once a certain size is reached it rotates to a new file
timedRotatingFileHandler = rotates log files at certain timed intervals
SMTPHandler = sens logging output to an email address via SMTP
HTTPHandler = sends logging output to a web server via HTTP POST or GET requests
sysLogHandler = sends logging output to a syslog server
socketHandler = sends logging output to a remote machine via TCP/IP sockets
memoryHandler = stores log records in memory and flushes them to another handler when a certain condition is met
Describe what load testing is, why it is useful and when it can be done in a Devops Lifecycle
Load testing is a type of performance testing that evaluates how a system behaves under a specific expected load. The goal is to determine how the system handles concurrent users and transactions, as well as to identify performance bottlenecks and ensure the system can perform adequately under peak conditions.
Describe what Locust is and how it works using Python
Locust is an open-source load testing tool in Python that allows you to define user behavior and simulate a large number of users to test the performance of web applications and APIs. It is designed to be scalable, distributed, and easy to use.