1Which HTTP status code is generally returned when a REST API successfully creates a new resource?
A.201 Created
B.202 Accepted
C.204 No Content
D.200 OK
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 increase the speed of the internet connection
C.To copy the production database
D.To generate documentation automatically
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.Postman
C.Git
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.Flutter
B.Laravel
C.Jest
D.Django
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.PUT
C.DELETE
D.POST
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?
B.The client does not have permission to access the resource despite authentication
C.The resource was not found
D.The server failed internally
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 is slower but more accurate
C.It eliminates the need for documentation
D.It allows for continuous execution within CI/CD pipelines
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 repository branch
B.A third-party plugin
C.The developer writing the code
D.A server that runs your workflow jobs
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./actions
B./config
C./deploy
D./.github/workflows
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 securely stores sensitive information like API keys and tokens
B.It speeds up the build process
C.It automatically fixes bugs in the code
D.It encrypts code so no one can read it
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 Projects
D.GitHub Actions
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.Continuous Integration
D.Central Intelligence
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.Super Speed Rendering
B.Static Site Routing
C.Server-Side Rendering
D.Secure Socket Rendering
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 sites use less bandwidth
B.SSR does not require a server
C.SSR pages are fully populated with content when the search engine crawler visits
D.SSR uses more JavaScript
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.Cleaning the cache
B.Adding water to the server
C.Downloading CSS files
D.The process of attaching event listeners to server-rendered HTML on the client side
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.Vercel
B.MySQL
C.XAMPP
D.Apache
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 only on the client browser
C.Generating HTML at build time
D.Generating HTML using a database query on the fly
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.Chai
B.Coffee
C.Axios
D.Express
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 number of API endpoints
B.The speed of the API
C.The number of developers working on the project
D.The percentage of source code executed during the test suite
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.400
B.500
C.200
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.An automated message sent from apps when something happens
C.A manual trigger for a database
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.Compiling
B.Linting
C.Integration Testing
D.Unit Testing
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.schedule
B.on
C.trigger
D.when
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.It is not secure
B.It cannot display images
C.It puts too much load on the server
D.The user sees a blank screen until the JavaScript bundle is downloaded and executed
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.Photoshop
B.Audacity
C.Heroku
D.Sublime Text
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.Deploying to AWS
B.Testing UI components
C.Managing databases
D.Testing HTTP assertions in Node.js
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 push
B.git fetch
C.git pull
D.git commit
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.The API is secure
B.The API changes state every time called
C.The API is very fast
D.Multiple identical requests have the same effect as a single request
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 host the database only
B.To write the initial code
C.To store backups
D.To mirror production for final testing before release
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.Time To Finish Booting
B.Testing Time For Backend
C.Total Time For Build
D.Time To First Byte
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..gitignore
C..gitkeep
D..gitconfig
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 without a backend
B.Testing via a web browser without a graphical user interface
C.Testing using only headers
D.Testing on a computer without a monitor
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.A file or collection of files produced during a workflow run
B.A bug in the code
C.An old version of the code
D.A comment on a pull request
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.The worst part of the network
B.A browser developed by Microsoft
C.The database layer
D.A distributed network of servers delivering content closer to the user
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 only the login page
B.Testing on Fridays
C.Testing the default scenario where no errors occur
D.Testing strictly error handling
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 checkout -b
B.git status
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.Incremental Static Regeneration
B.Internet Service Rendering
C.Instant Server Restart
D.Internal System Routing
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 font size
B.The server IP address
C.The status code and response body
D.The time of day
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 zip file of source code
C.A package of icons
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 style the page based on the weather
B.To change configuration settings (DB URL, Keys) without changing code
C.To track user environments
D.To variable global JavaScript scope
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.Compressing images
B.Analyzing code for potential errors and stylistic issues
C.Connecting to the database
D.Minifying CSS
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.Accept-Charset
B.User-Agent
C.Authorization
D.Content-Type
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.Creating a new issue
B.Pulling code from the server to local
C.Deleting a repository
D.Code review and discussion before merging changes
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.HDD
B.BDD
C.TDD
D.CDD
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.Hosting static sites and Jamstack applications
B.Machine Learning processing
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 the color of the UI
C.Checking if the database is online
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.Starting a server in a cold room
C.A reboot caused by a crash
D.The delay experienced when a serverless function is invoked after being idle
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.