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 copy the production database
C. To increase the speed of the internet connection
D. To generate documentation automatically

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

11 What 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 encrypts code so no one can read it
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 Actions
C. GitHub Pages
D. GitHub Projects

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

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

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

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

15 What 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 uses more JavaScript
D. SSR pages are fully populated with content when the search engine crawler visits

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

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

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

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

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

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

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

20 When testing an API, what does 'Code Coverage' measure?

A. The number of developers working on the project
B. The percentage of source code executed during the test suite
C. The number of API endpoints
D. The speed of the API

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

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

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

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

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

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

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

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

25 What is the primary disadvantage of Client-Side Rendering (CSR) regarding initial load?

A. It puts too much load on the server
B. The user sees a blank screen until the JavaScript bundle is downloaded and executed
C. It is not secure
D. It cannot display images

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

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

27 What is 'Supertest' used for?

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

28 Which 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

29 In 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 changes state every time called
D. The API is secure

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

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

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

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

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

33 What is 'Headless Browser' testing?

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

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

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

35 Which 5xx error indicates 'Service Unavailable'?

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

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

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

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

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

38 Which command creates a new branch in Git?

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

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

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

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

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

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

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

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

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

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

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

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

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

45 What is the main benefit of 'Serverless Functions' (e.g., AWS Lambda, Netlify Functions)?

A. They are slower than traditional servers
B. They run continuously 24/7
C. You only pay for the compute time used when the function runs
D. You own the physical server

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

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

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

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

48 What is 'Netlify' primarily known for?

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

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

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

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

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