challenges2 Flashcards

1
Q

Define the SonarCloud issue categories: 🐞 Bugs, πŸ”“ Vulnerabilities, πŸ›‘ Security Hotspots and ☒ Code Smells.

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain what a Quality Gate is and how it helps you monitor the quality and security of your code.

A

A Quality Gate is a set of conditions or criteria that a software project must meet to be considered ready for release

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe what Selenium is what what role it fill in the DevOps Lifecycle.

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe what a WebDriver is.

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How the assert() function in Python can be combined with Selenium scripts to create tests.

A

You can combine the assert statement with Selenium scripts to create automated tests that check specific conditions or values on a web page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How Selenium works to select components of a website.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain what depends-on: does in a Docker Compose file and how it is useful

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe which ways you can send alert messages using handlers in the Python ``logging` module

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Describe what load testing is, why it is useful and when it can be done in a Devops Lifecycle

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe what Locust is and how it works using Python

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly