You are on page 1of 3

1

Manual Testing:

1. Hands-On Testing: Humans perform the tests by interacting with the software, relying on
their judgment and intuition.

2. Exploration Capability: Testers can freely explore the software to find issues that might not
be covered by predefined tests.

3. Quick Setup: Faster to set up for smaller projects or when immediate testing is needed
without complex automation.

4. User-Focused Evaluation: Involves assessing the user interface, usability, and overall user
experience from a human perspective.

5. Adaptability: Suited for changing test scenarios, ad-hoc testing, and situations where test
cases need frequent adjustments.

Automated Testing:

1. Scripted Execution: Tests are pre-programmed and executed by automated tools, reducing
manual involvement.

2. Repeatable Tests: Automated tests can be rerun consistently, ensuring the same set of tests
can be executed multiple times.

3. Regression Testing: Effective for quickly checking if new code changes break existing
functionalities.

4. Scalability: Ideal for larger projects with many test scenarios, efficiently covering a wide
range of functionalities.

5. Resource Efficiency: Automated tests can run overnight or simultaneously, using computing
resources effectively for faster testing.

2.
Docker is a platform that utilizes containerization technology to package, distribute, and run
applications in isolated environments called containers. Containers encapsulate an application
and its dependencies, ensuring consistent and portable deployment across various computing
environments.

Some of the Docker components are:-


1. Containers: Docker uses containers to encapsulate and run applications, ensuring
consistency across different environments.

2. Images: Docker images are lightweight, stand-alone, and executable packages that include
everything needed to run a piece of software.

3. Dockerfile: A script defining steps to create a Docker image, specifying dependencies,


configurations, and execution commands.

4. Registry: Docker images are stored and shared in registries, like Docker Hub, providing a
central repository for image distribution.

5. Volumes: Docker volumes enable data persistence by allowing containers to share and
store data outside their lifecycle.

6. Compose: Docker Compose is a tool for defining and managing multi-container Docker
applications using a YAML file.

7. Swarm: Docker Swarm is a native clustering and orchestration solution, allowing the
creation and management of a swarm of Docker nodes.

8. Services: Docker services define how a container behaves in production, enabling scaling,
updates, and rolling deployments.

9. Networks: Docker networks facilitate communication between containers, enabling seamless


interaction within a Docker environment.

10. Stack: Docker stack allows the deployment and management of a complete application
stack, comprising multiple services and networks.

PRACTICAL

<!DOCTYPE html>
<html lang="en">
<head>
<title>Phone Number Validator</title>
</head>
<body>
<h2>Phone Number Validator</h2>
<form action="validate.php" method="post">
<label for="phone">Enter Phone Number:</label>
<input type="tel" id="phone" name="phone" required>
<button type="submit">Validate</button>
</form>
</body>
</html>

php:-

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$phoneNo = $_POST["phone"];

echo isValid($phoneNo)
? "Phone number is valid: $phoneNo"
: "Invalid phone number: $phoneNo";
}

function isValid($number) {
return (bool) preg_match('/^[0-9]{7,15}$/', $number);
}
?>

You might also like