Unit 6 - Practice Quiz

INT222 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 Which HTTP status code is generally returned when a REST API successfully creates a new resource?

A. 201 Created
B. 200 OK
C. 202 Accepted
D. 204 No Content

2 In 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 generate documentation automatically
D. To copy the production database

3 Which tool is widely used for manual testing and documentation of REST APIs?

A. Webpack
B. Postman
C. Git
D. Jenkins

4 Which of the following is a popular JavaScript testing framework often used with Node.js APIs?

A. Django
B. Laravel
C. Jest
D. Flutter

5 In a REST API test, which HTTP method is typically used to verify that a specific resource is removed from the server?

A. GET
B. DELETE
C. PUT
D. POST

6 What does the HTTP status code 401 Unauthorized indicate during an API test?

A. The resource was not found
B. The client does not have permission to access the resource despite authentication
C. The server failed internally
D. The request lacks valid authentication credentials

7 What is the main advantage of using Automated API Testing over Manual Testing?

A. It is slower but more accurate
B. It eliminates the need for documentation
C. It allows for continuous execution within CI/CD pipelines
D. It requires no coding knowledge

8 Which file extension is used to define GitHub Actions workflows?

A. .js
B. .yml or .yaml
C. .json
D. .xml

9 In GitHub Actions, what is a 'Runner'?

A. A server that runs your workflow jobs
B. The repository branch
C. The developer writing the code
D. A third-party plugin

10 Which directory must GitHub Actions workflow files be placed in?

A. /deploy
B. /.github/workflows
C. /config
D. /actions

11 What is the primary benefit of using 'GitHub Secrets' during deployment?

A. It encrypts code so no one can read it
B. It speeds up the build process
C. It securely stores sensitive information like API keys and tokens
D. It automatically fixes bugs in the code

12 Which GitHub feature is specifically designed for hosting static websites directly from a repository?

A. GitHub Issues
B. GitHub Projects
C. GitHub Actions
D. GitHub Pages

13 What does CI stand for in the context of deployment?

A. Central Intelligence
B. Code Integration
C. Cloud Interface
D. Continuous Integration

14 In the context of web rendering, what does SSR stand for?

A. Super Speed Rendering
B. Secure Socket Rendering
C. Static Site Routing
D. Server-Side Rendering

15 What is a major SEO advantage of Server-Side Rendering (SSR) over Client-Side Rendering (CSR)?

A. SSR pages are fully populated with content when the search engine crawler visits
B. SSR does not require a server
C. SSR sites use less bandwidth
D. SSR uses more JavaScript

16 What is 'Hydration' in the context of third-party rendering frameworks like Next.js?

A. Downloading CSS files
B. Adding water to the server
C. Cleaning the cache
D. The process of attaching event listeners to server-rendered HTML on the client side

17 Which platform is widely known for its 'zero-config' deployment for frontend frameworks like React and Vue?

A. MySQL
B. Vercel
C. Apache
D. XAMPP

18 What is 'Static Site Generation' (SSG)?

A. Generating HTML using a database query on the fly
B. Generating HTML on every request
C. Generating HTML only on the client browser
D. Generating HTML at build time

19 Which library is commonly paired with Mocha to write assertions in Node.js API testing?

A. Coffee
B. Axios
C. Chai
D. Express

20 When 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

21 Which status code implies a 'Bad Request' usually due to invalid syntax by the client?

A. 500
B. 301
C. 200
D. 400

22 What is a 'Webhook' in the context of deployment?

A. An automated message sent from apps when something happens
B. A manual trigger for a database
C. A hook to catch fish
D. A security vulnerability

23 Which testing concept involves checking if different modules of an application work together as expected?

A. Unit Testing
B. Compiling
C. Integration Testing
D. Linting

24 In GitHub Actions, what keyword is used to define when a workflow should run?

A. trigger
B. when
C. schedule
D. on

25 What 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 is not secure
C. It cannot display images
D. It puts too much load on the server

26 Which service is a PaaS (Platform as a Service) often used for deploying Node.js backends easily?

A. Heroku
B. Sublime Text
C. Photoshop
D. Audacity

27 What is 'Supertest' used for?

A. Testing UI components
B. Deploying to AWS
C. Testing HTTP assertions in Node.js
D. Managing databases

28 Which git command transfers commits from a local repository to a remote GitHub repository?

A. git commit
B. git push
C. git pull
D. git fetch

29 In REST API testing, what does 'Idempotency' mean?

A. The API changes state every time called
B. Multiple identical requests have the same effect as a single request
C. The API is secure
D. The API is very fast

30 What 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

31 What does 'TTFB' stand for in performance metrics?

A. Time To First Byte
B. Time To Finish Booting
C. Testing Time For Backend
D. Total Time For Build

32 Which file is used to prevent specific files from being uploaded to GitHub?

A. .gitconfig
B. .gitignore
C. .gitkeep
D. .gitremove

33 What is 'Headless Browser' testing?

A. Testing without a backend
B. Testing via a web browser without a graphical user interface
C. Testing on a computer without a monitor
D. Testing using only headers

34 In a GitHub Action, what is an 'artifact'?

A. An old version of the code
B. A bug in the code
C. A file or collection of files produced during a workflow run
D. A comment on a pull request

35 Which 5xx error indicates 'Service Unavailable'?

A. 503
B. 502
C. 500
D. 504

36 What is the 'Edge Network' in the context of third-party hosting (like Netlify/Vercel)?

A. A browser developed by Microsoft
B. The worst part of the network
C. A distributed network of servers delivering content closer to the user
D. The database layer

37 When testing APIs, what does the 'Happy Path' refer to?

A. Testing the default scenario where no errors occur
B. Testing only the login page
C. Testing strictly error handling
D. Testing on Fridays

38 Which command creates a new branch in Git?

A. git remote add
B. git checkout -b
C. git branch -d
D. git status

39 What is 'ISR' in Next.js deployment?

A. Internet Service Rendering
B. Incremental Static Regeneration
C. Internal System Routing
D. Instant Server Restart

40 Which component of a response is most crucial to assert in an API test?

A. The status code and response body
B. The font size
C. The time of day
D. The server IP address

41 In deployment, what is a 'Build Pack'?

A. A database backup
B. Scripts that compile code into a slug/executable for cloud platforms
C. A zip file of source code
D. A package of icons

42 What is the purpose of 'environment variables' in deployment?

A. To change configuration settings (DB URL, Keys) without changing code
B. To variable global JavaScript scope
C. To style the page based on the weather
D. To track user environments

43 What is 'Linting' in the context of pre-deployment?

A. Compressing images
B. Minifying CSS
C. Analyzing code for potential errors and stylistic issues
D. Connecting to the database

44 Which header field describes the media type of the content sent in an API request/response?

A. Content-Type
B. Authorization
C. Accept-Charset
D. User-Agent

45 What 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 are slower than traditional servers
D. They run continuously 24/7

46 What does a 'Pull Request' (PR) facilitate in GitHub?

A. Deleting a repository
B. Creating a new issue
C. Code review and discussion before merging changes
D. Pulling code from the server to local

47 Which testing methodology is characterized by writing the test before writing the code?

A. TDD
B. CDD
C. HDD
D. BDD

48 What is 'Netlify' primarily known for?

A. Hosting static sites and Jamstack applications
B. Relational Database Hosting
C. Video streaming
D. Machine Learning processing

49 In an API test, what does verifying the 'Schema' involve?

A. Ensuring the response structure matches the expected JSON format
B. Checking if the database is online
C. Checking the color of the UI
D. Verifying the SSL certificate

50 What is a 'Cold Start' in serverless deployment?

A. Deploying without a cache
B. A reboot caused by a crash
C. Starting a server in a cold room
D. The delay experienced when a serverless function is invoked after being idle