1Which HTTP status code is generally returned when a REST API successfully creates a new resource?
A.201 Created
B.202 Accepted
C.200 OK
D.204 No Content
Correct Answer: 201 Created
Explanation:
While 200 is a generic success code, 201 Created is the specific standard status code indicating that a request has led to the creation of a new resource.
Incorrect! Try again.
2In the context of testing REST APIs, what is the primary purpose of 'Mocking'?
A.To simulate the behavior of real objects or external services
B.To copy the production database
C.To generate documentation automatically
D.To increase the speed of the internet connection
Correct Answer: To simulate the behavior of real objects or external services
Explanation:
Mocking allows developers to test specific units of code in isolation by simulating external dependencies like databases or third-party APIs.
Incorrect! Try again.
3Which tool is widely used for manual testing and documentation of REST APIs?
A.Webpack
B.Git
C.Postman
D.Jenkins
Correct Answer: Postman
Explanation:
Postman is a popular API client that allows developers to send requests, inspect responses, and document API endpoints manually or via automation.
Incorrect! Try again.
4Which of the following is a popular JavaScript testing framework often used with Node.js APIs?
A.Django
B.Flutter
C.Laravel
D.Jest
Correct Answer: Jest
Explanation:
Jest is a delightful JavaScript testing framework with a focus on simplicity, widely used for testing Node.js applications and React apps.
Incorrect! Try again.
5In a REST API test, which HTTP method is typically used to verify that a specific resource is removed from the server?
A.GET
B.POST
C.PUT
D.DELETE
Correct Answer: DELETE
Explanation:
The DELETE method is used to request that a resource be removed; testing involves verifying the response code and ensuring the resource is no longer retrievable.
Incorrect! Try again.
6What does the HTTP status code 401 Unauthorized indicate during an API test?
D.The client does not have permission to access the resource despite authentication
Correct Answer: The request lacks valid authentication credentials
Explanation:
401 indicates that the user is anonymous or provided invalid credentials. This is distinct from 403 Forbidden, where the user is known but lacks permission.
Incorrect! Try again.
7What is the main advantage of using Automated API Testing over Manual Testing?
A.It requires no coding knowledge
B.It allows for continuous execution within CI/CD pipelines
C.It eliminates the need for documentation
D.It is slower but more accurate
Correct Answer: It allows for continuous execution within CI/CD pipelines
Explanation:
Automated tests can be run frequently and instantly whenever code changes, facilitating Continuous Integration/Continuous Deployment.
Incorrect! Try again.
8Which file extension is used to define GitHub Actions workflows?
A..xml
B..json
C..yml or .yaml
D..js
Correct Answer: .yml or .yaml
Explanation:
GitHub Actions configuration files use YAML (Yet Another Markup Language) syntax.
Incorrect! Try again.
9In GitHub Actions, what is a 'Runner'?
A.The developer writing the code
B.A server that runs your workflow jobs
C.A third-party plugin
D.The repository branch
Correct Answer: A server that runs your workflow jobs
Explanation:
A runner is a server (hosted by GitHub or self-hosted) that listens for available jobs, runs one job at a time, and reports the progress, logs, and results.
Incorrect! Try again.
10Which directory must GitHub Actions workflow files be placed in?
A./.github/workflows
B./deploy
C./actions
D./config
Correct Answer: /.github/workflows
Explanation:
GitHub looks for YAML workflow files specifically in the .github/workflows directory of the repository.
Incorrect! Try again.
11What is the primary benefit of using 'GitHub Secrets' during deployment?
A.It speeds up the build process
B.It automatically fixes bugs in the code
C.It encrypts code so no one can read it
D.It securely stores sensitive information like API keys and tokens
Correct Answer: It securely stores sensitive information like API keys and tokens
Explanation:
GitHub Secrets allows you to store sensitive data as environment variables that are injected into the workflow runner securely without exposing them in the codebase.
Incorrect! Try again.
12Which GitHub feature is specifically designed for hosting static websites directly from a repository?
A.GitHub Issues
B.GitHub Pages
C.GitHub Actions
D.GitHub Projects
Correct Answer: GitHub Pages
Explanation:
GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files directly from a repository and publishes a website.
Incorrect! Try again.
13What does CI stand for in the context of deployment?
A.Cloud Interface
B.Code Integration
C.Central Intelligence
D.Continuous Integration
Correct Answer: Continuous Integration
Explanation:
Continuous Integration is the practice of automating the integration of code changes from multiple contributors into a single software project.
Incorrect! Try again.
14In the context of web rendering, what does SSR stand for?
A.Server-Side Rendering
B.Super Speed Rendering
C.Secure Socket Rendering
D.Static Site Routing
Correct Answer: Server-Side Rendering
Explanation:
SSR stands for Server-Side Rendering, where the HTML is generated on the server for each request before being sent to the client.
Incorrect! Try again.
15What is a major SEO advantage of Server-Side Rendering (SSR) over Client-Side Rendering (CSR)?
A.SSR does not require a server
B.SSR sites use less bandwidth
C.SSR uses more JavaScript
D.SSR pages are fully populated with content when the search engine crawler visits
Correct Answer: SSR pages are fully populated with content when the search engine crawler visits
Explanation:
Search engine crawlers can easily index SSR pages because the HTML content is available immediately, whereas CSR requires JavaScript execution to generate content.
Incorrect! Try again.
16What is 'Hydration' in the context of third-party rendering frameworks like Next.js?
A.Adding water to the server
B.Cleaning the cache
C.The process of attaching event listeners to server-rendered HTML on the client side
D.Downloading CSS files
Correct Answer: The process of attaching event listeners to server-rendered HTML on the client side
Explanation:
Hydration allows a static HTML page (generated via SSR or SSG) to become interactive by attaching JavaScript event listeners in the browser.
Incorrect! Try again.
17Which platform is widely known for its 'zero-config' deployment for frontend frameworks like React and Vue?
A.MySQL
B.Apache
C.Vercel
D.XAMPP
Correct Answer: Vercel
Explanation:
Vercel provides a seamless, zero-configuration deployment experience optimized for frontend frameworks, particularly Next.js.
Incorrect! Try again.
18What is 'Static Site Generation' (SSG)?
A.Generating HTML on every request
B.Generating HTML at build time
C.Generating HTML using a database query on the fly
D.Generating HTML only on the client browser
Correct Answer: Generating HTML at build time
Explanation:
SSG generates the HTML pages during the build process. These pre-built pages are then served to the client, resulting in very fast load times.
Incorrect! Try again.
19Which library is commonly paired with Mocha to write assertions in Node.js API testing?
A.Express
B.Axios
C.Coffee
D.Chai
Correct Answer: Chai
Explanation:
Chai is an assertion library often used with Mocha that provides readable styles like 'expect', 'should', and 'assert'.
Incorrect! Try again.
20When testing an API, what does 'Code Coverage' measure?
A.The speed of the API
B.The number of API endpoints
C.The percentage of source code executed during the test suite
D.The number of developers working on the project
Correct Answer: The percentage of source code executed during the test suite
Explanation:
Code coverage helps identify which parts of the application logic are not being tested by the current test suite.
Incorrect! Try again.
21Which status code implies a 'Bad Request' usually due to invalid syntax by the client?
A.200
B.400
C.500
D.301
Correct Answer: 400
Explanation:
HTTP 400 Bad Request indicates that the server cannot or will not process the request due to something that is perceived to be a client error.
Incorrect! Try again.
22What is a 'Webhook' in the context of deployment?
A.A security vulnerability
B.A manual trigger for a database
C.An automated message sent from apps when something happens
D.A hook to catch fish
Correct Answer: An automated message sent from apps when something happens
Explanation:
Webhooks are user-defined HTTP callbacks. They are usually triggered by some event, such as pushing code to a repository, which can then trigger a deployment server.
Incorrect! Try again.
23Which testing concept involves checking if different modules of an application work together as expected?
A.Integration Testing
B.Unit Testing
C.Compiling
D.Linting
Correct Answer: Integration Testing
Explanation:
Integration testing focuses on verifying the interactions between different units or modules to ensure they function correctly when combined.
Incorrect! Try again.
24In GitHub Actions, what keyword is used to define when a workflow should run?
A.trigger
B.schedule
C.when
D.on
Correct Answer: on
Explanation:
The 'on' keyword in the YAML file defines the events (like push, pull_request) that trigger the workflow.
Incorrect! Try again.
25What is the primary disadvantage of Client-Side Rendering (CSR) regarding initial load?
A.The user sees a blank screen until the JavaScript bundle is downloaded and executed
B.It cannot display images
C.It puts too much load on the server
D.It is not secure
Correct Answer: The user sees a blank screen until the JavaScript bundle is downloaded and executed
Explanation:
CSR requires the browser to download and run JavaScript before any content is rendered, leading to a slower 'Time to First Contentful Paint'.
Incorrect! Try again.
26Which service is a PaaS (Platform as a Service) often used for deploying Node.js backends easily?
A.Sublime Text
B.Audacity
C.Photoshop
D.Heroku
Correct Answer: Heroku
Explanation:
Heroku is a cloud platform that lets companies build, deliver, monitor, and scale apps (PaaS), popular for simple backend deployments.
Incorrect! Try again.
27What is 'Supertest' used for?
A.Testing UI components
B.Managing databases
C.Testing HTTP assertions in Node.js
D.Deploying to AWS
Correct Answer: Testing HTTP assertions in Node.js
Explanation:
Supertest is a high-level abstraction for testing HTTP, allowing you to send requests to your Express app and assert responses easily.
Incorrect! Try again.
28Which git command transfers commits from a local repository to a remote GitHub repository?
A.git commit
B.git fetch
C.git pull
D.git push
Correct Answer: git push
Explanation:
Git push updates remote refs using local refs, effectively sending your committed changes to the remote repository.
Incorrect! Try again.
29In REST API testing, what does 'Idempotency' mean?
A.Multiple identical requests have the same effect as a single request
B.The API is very fast
C.The API is secure
D.The API changes state every time called
Correct Answer: Multiple identical requests have the same effect as a single request
Explanation:
Methods like PUT and DELETE are idempotent; calling them once or multiple times in a row results in the same state on the server.
Incorrect! Try again.
30What is the purpose of a 'staging' environment in deployment?
A.To store backups
B.To host the database only
C.To mirror production for final testing before release
D.To write the initial code
Correct Answer: To mirror production for final testing before release
Explanation:
A staging environment is a near-exact replica of production used to test the deployment of new features to ensure nothing breaks before going live.
Incorrect! Try again.
31What does 'TTFB' stand for in performance metrics?
A.Total Time For Build
B.Time To Finish Booting
C.Time To First Byte
D.Testing Time For Backend
Correct Answer: Time To First Byte
Explanation:
TTFB measures the time between the browser requesting a page and receiving the first byte of information from the server.
Incorrect! Try again.
32Which file is used to prevent specific files from being uploaded to GitHub?
A..gitremove
B..gitkeep
C..gitconfig
D..gitignore
Correct Answer: .gitignore
Explanation:
The .gitignore file specifies intentionally untracked files that Git should ignore (e.g., node_modules, environment files).
Incorrect! Try again.
33What is 'Headless Browser' testing?
A.Testing using only headers
B.Testing on a computer without a monitor
C.Testing via a web browser without a graphical user interface
D.Testing without a backend
Correct Answer: Testing via a web browser without a graphical user interface
Explanation:
Headless browsers (like Puppeteer) allow automated control of a web page in an environment similar to popular web browsers, but without a visible UI.
Incorrect! Try again.
34In a GitHub Action, what is an 'artifact'?
A.An old version of the code
B.A bug in the code
C.A comment on a pull request
D.A file or collection of files produced during a workflow run
Correct Answer: A file or collection of files produced during a workflow run
Explanation:
Artifacts allow you to persist data after a job has completed, such as compiled binaries, test results, or logs.
503 indicates the server is currently unable to handle the request due to temporary overloading or maintenance.
Incorrect! Try again.
36What is the 'Edge Network' in the context of third-party hosting (like Netlify/Vercel)?
A.A distributed network of servers delivering content closer to the user
B.A browser developed by Microsoft
C.The database layer
D.The worst part of the network
Correct Answer: A distributed network of servers delivering content closer to the user
Explanation:
Edge networks (CDNs) cache content at various geographical locations to reduce latency for users, regardless of where the origin server is.
Incorrect! Try again.
37When testing APIs, what does the 'Happy Path' refer to?
A.Testing the default scenario where no errors occur
B.Testing on Fridays
C.Testing strictly error handling
D.Testing only the login page
Correct Answer: Testing the default scenario where no errors occur
Explanation:
The Happy Path is a test case where inputs are valid and the system functions exactly as expected without exceptions.
Incorrect! Try again.
38Which command creates a new branch in Git?
A.git status
B.git checkout -b
C.git branch -d
D.git remote add
Correct Answer: git checkout -b
Explanation:
While 'git branch' lists branches, 'git checkout -b <name>' (or 'git switch -c') creates a new branch and switches to it immediately.
Incorrect! Try again.
39What is 'ISR' in Next.js deployment?
A.Internal System Routing
B.Incremental Static Regeneration
C.Internet Service Rendering
D.Instant Server Restart
Correct Answer: Incremental Static Regeneration
Explanation:
ISR allows you to update static pages after you have built your site, enabling you to use static generation on a per-page basis without rebuilding the entire site.
Incorrect! Try again.
40Which component of a response is most crucial to assert in an API test?
A.The status code and response body
B.The time of day
C.The server IP address
D.The font size
Correct Answer: The status code and response body
Explanation:
The status code confirms the outcome of the request, and the body contains the actual data returned.
Incorrect! Try again.
41In deployment, what is a 'Build Pack'?
A.A database backup
B.A package of icons
C.A zip file of source code
D.Scripts that compile code into a slug/executable for cloud platforms
Correct Answer: Scripts that compile code into a slug/executable for cloud platforms
Explanation:
Buildpacks are used by platforms like Heroku to transform application source code into a standard format (image/slug) that can be executed on the cloud.
Incorrect! Try again.
42What is the purpose of 'environment variables' in deployment?
A.To change configuration settings (DB URL, Keys) without changing code
B.To style the page based on the weather
C.To variable global JavaScript scope
D.To track user environments
Correct Answer: To change configuration settings (DB URL, Keys) without changing code
Explanation:
Environment variables allow you to manage configuration across different environments (dev, staging, prod) securely and flexibly.
Incorrect! Try again.
43What is 'Linting' in the context of pre-deployment?
A.Analyzing code for potential errors and stylistic issues
B.Compressing images
C.Minifying CSS
D.Connecting to the database
Correct Answer: Analyzing code for potential errors and stylistic issues
Explanation:
Linting tools (like ESLint) analyze source code to flag programming errors, bugs, stylistic errors, and suspicious constructs.
Incorrect! Try again.
44Which header field describes the media type of the content sent in an API request/response?
A.Content-Type
B.Accept-Charset
C.Authorization
D.User-Agent
Correct Answer: Content-Type
Explanation:
Content-Type (e.g., application/json) tells the client or server what type of data is actually contained within the body.
Incorrect! Try again.
45What is the main benefit of 'Serverless Functions' (e.g., AWS Lambda, Netlify Functions)?
A.You own the physical server
B.You only pay for the compute time used when the function runs
C.They run continuously 24/7
D.They are slower than traditional servers
Correct Answer: You only pay for the compute time used when the function runs
Explanation:
Serverless allows developers to write code without managing servers, and costs are based on actual execution time rather than reserved capacity.
Incorrect! Try again.
46What does a 'Pull Request' (PR) facilitate in GitHub?
A.Code review and discussion before merging changes
B.Creating a new issue
C.Pulling code from the server to local
D.Deleting a repository
Correct Answer: Code review and discussion before merging changes
Explanation:
A PR notifies team members that you have completed a feature. It allows for code review and discussion before the changes are merged into the main branch.
Incorrect! Try again.
47Which testing methodology is characterized by writing the test before writing the code?
A.CDD
B.HDD
C.TDD
D.BDD
Correct Answer: TDD
Explanation:
TDD (Test-Driven Development) is a process where you write a failing test first, then write enough code to pass it, and then refactor.
Incorrect! Try again.
48What is 'Netlify' primarily known for?
A.Machine Learning processing
B.Hosting static sites and Jamstack applications
C.Relational Database Hosting
D.Video streaming
Correct Answer: Hosting static sites and Jamstack applications
Explanation:
Netlify is a platform designed to automate modern web projects, specifically those using the JAMstack architecture (JavaScript, APIs, Markup).
Incorrect! Try again.
49In an API test, what does verifying the 'Schema' involve?
A.Verifying the SSL certificate
B.Checking if the database is online
C.Checking the color of the UI
D.Ensuring the response structure matches the expected JSON format
Correct Answer: Ensuring the response structure matches the expected JSON format
Explanation:
Schema validation ensures that the JSON response contains the correct fields and data types (e.g., verifying 'id' is a number and 'name' is a string).
Incorrect! Try again.
50What is a 'Cold Start' in serverless deployment?
A.Deploying without a cache
B.The delay experienced when a serverless function is invoked after being idle
C.A reboot caused by a crash
D.Starting a server in a cold room
Correct Answer: The delay experienced when a serverless function is invoked after being idle
Explanation:
If a serverless function hasn't been called recently, the provider must spin up a new container to handle the request, causing a slight delay.
Incorrect! Try again.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill.
The rest comes out of a student's own pocket: the domain, the storage,
and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it.
What it pays for →