Skip to content

Capgemini MEAN Stack Interview Questions & Answers

Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.

About Capgemini hiring for MEAN Stack roles

Capgemini is a French multinational IT services and consulting group providing technology, engineering, cloud and data services. India is its largest employee base, supporting projects in testing, application development, SAP, data engineering and analytics for global clients. It hires freshers as analysts and software engineers, and experienced professionals in QA automation, data and cloud roles.

For MEAN Stack roles, this Capgemini practice set focuses most on Angular Forms and HTTP Client (6), Node.js and Express APIs (5), Angular Components and Templates (5), MongoDB Data Modelling and Queries (5). It has 8 easy, 21 medium, 1 hard questions, so you can start easy and work up to the harder ones.

Company type
IT services
Headquarters
Paris, France
Main India offices
Mumbai, Bengaluru, Pune, Chennai, Hyderabad

Capgemini MEAN Stack interview process

  1. Online assessment (pseudocode + English)
  2. Game-based aptitude test
  3. Technical interview
  4. HR round

Typical pattern based on public candidate experiences. Rounds vary by role, team and year.

Solved for CapgeminiStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
3 questions free Unlock the rest in seconds
01

How should HTTP errors be handled in an Angular application?

Save to ▾
Show answer
Handle them at two levels. A global error interceptor catches HttpErrorResponse, redirects to login on 401, shows a toast for 500 errors and logs details. Component or service code uses catchError to provide fallbacks or show specific messages, such as field errors from a 422 response. Use retry with a delay for transient network failures, and never leave errors unhandled so the UI shows a blank state.
02

Write a custom validator that rejects passwords without a number and an uppercase letter.

Save to ▾
Show answer
A ValidatorFn returns null or an error map. import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms'; export function strongPassword(): ValidatorFn { return (control: AbstractControl): ValidationErrors | null => { const value = control.value as string; if (!value) return null; const ok = /[A-Z]/.test(value) && /\d/.test(value); return ok ? null : { weakPassword: true }; }; } // password: ['', [Validators.required, strongPassword()]] // @if (form.controls.password.hasError('weakPassword')) { ... }
03

What is middleware in Express, and what kinds of middleware are there?

Save to ▾
Show answer
Middleware is a function with access to req, res and next that runs in order for matching requests. Kinds include application-level middleware registered with app.use, router-level middleware on an express.Router, built-in middleware like express.json and express.static, third-party middleware such as cors, helmet and morgan, and error-handling middleware with four arguments. Middleware can end the response or pass control with next().
04

How does the Node.js event loop affect the way you write Express route handlers?

Save to ▾
Show answer
Every request handler runs on the same main thread, so any synchronous heavy work, such as a large loop, JSON parsing of huge payloads, sync file reads or bcrypt with sync methods, blocks all other requests. Write handlers with async I/O, keep CPU work small, stream large data, and offload heavy jobs to worker threads or a queue. Monitor event-loop lag in production to catch blocking code.
05

Tell me about a complex form you built and the challenges you solved.

Save to ▾
Show answer
Situation: I built a loan application form with five steps and over sixty fields. Task: make it reliable and user friendly. Action: I used typed reactive forms split into step groups, cross-field validators for income rules, a FormArray for co-applicants, auto-saved drafts every thirty seconds and mapped server validation errors back to fields. Result: drop-offs reduced noticeably and QA found very few form bugs.
06

What is Angular and how is it different from a library like React?

Save to ▾
Show answer
Angular is a complete, opinionated front-end framework maintained by Google for building single-page applications in TypeScript. It includes routing, forms, an HTTP client, dependency injection, testing tools and a CLI out of the box, so teams follow a consistent structure. React is a UI library and relies on third-party choices for routing and state. Angular's structure suits large enterprise teams and long-lived projects.
07

How does change detection work in Angular, and what does OnPush do?

Save to ▾
Show answer
Change detection checks component bindings and updates the DOM when data changes. Traditionally Zone.js patched async APIs and triggered a check of the whole tree after events, timers and HTTP calls. With ChangeDetectionStrategy.OnPush, a component is checked only when an input reference changes, an event fires inside it, an async pipe emits or a signal it reads changes. OnPush with immutable data greatly reduces work.
08

Configure routes with lazy loading, a child route and a wildcard 404 route.

Save to ▾
Show answer
app.routes.ts: import { Routes } from '@angular/router'; export const routes: Routes = [ { path: '', loadComponent: () => import('./home/home.component').then(m => m.HomeComponent) }, { path: 'products', loadChildren: () => import('./products/product.routes').then(m => m.PRODUCT_ROUTES) }, { path: 'login', loadComponent: () => import('./auth/login.component').then(m => m.LoginComponent) }, { path: '**', loadComponent: () => import('./not-found.component').then(m => m.NotFoundComponent) } ]; // app.config.ts providers: [provideRouter(routes, withComponentInputBinding())]
09

The security team asks you to move JWTs out of localStorage in the Angular app. What design would you propose?

Save to ▾
Show answer
Issue a short-lived access token kept only in memory in an Angular auth service, and a refresh token in an httpOnly, Secure, SameSite cookie scoped to the refresh path. On page load, call the refresh endpoint to get a new access token. An interceptor attaches the access token and refreshes on 401. Rotate refresh tokens and store their hashes server-side so they can be revoked.
10

Write mongosh commands to inspect a slow query and the indexes on a collection.

Save to ▾
Show answer
Useful diagnostic commands: db.orders.getIndexes() db.orders.find({ status: 'pending', city: 'Pune' }) .sort({ createdAt: -1 }) .explain('executionStats') db.setProfilingLevel(1, { slowms: 100 }) db.system.profile.find().sort({ ts: -1 }).limit(5) db.orders.createIndex({ status: 1, city: 1, createdAt: -1 }) Compare totalDocsExamined with nReturned before and after creating the index.
11

What is HttpClient and how is it set up in a standalone Angular app?

Save to ▾
Show answer
HttpClient is Angular's service for making HTTP requests. It returns Observables, automatically parses JSON, supports typed responses with generics, interceptors, progress events and request cancellation by unsubscribing. In a standalone app you register it with provideHttpClient() in app.config.ts, optionally with withInterceptors([...]) and withFetch() to use the Fetch API, which is recommended for server-side rendering.
12

What are Subject, BehaviorSubject, ReplaySubject and AsyncSubject?

Save to ▾
Show answer
A Subject is both an Observable and an observer, multicasting values to subscribers but giving late subscribers nothing from the past. BehaviorSubject needs an initial value and gives the latest value to new subscribers, popular for state like the current user. ReplaySubject replays a set number of past values. AsyncSubject emits only the final value on completion. In new code, signals often replace BehaviorSubject for state.
13

What is the difference between template-driven and reactive forms in Angular?

Save to ▾
Show answer
Template-driven forms build the form model from directives in the template, mainly ngModel, and suit small, simple forms. Reactive forms define the model explicitly in the component with FormControl, FormGroup and FormArray, giving synchronous access, strong typing, easier dynamic fields, observable valueChanges and simpler unit testing. Most enterprise Angular applications use reactive forms for complex or validated forms.
14

Write Mongoose queries to filter, sort, paginate and select fields for a products listing.

Save to ▾
Show answer
Chain query helpers and run count in parallel. const filter = { category: req.query.category, price: { $gte: Number(req.query.min) || 0 }, isActive: true }; const [items, total] = await Promise.all([ Product.find(filter) .select('name price images rating') .sort({ rating: -1, _id: 1 }) .skip((page - 1) * limit) .limit(limit) .lean(), Product.countDocuments(filter) ]); Adding _id to the sort keeps the order stable between pages.
15

What is an Angular component and what are its main parts?

Save to ▾
Show answer
A component controls a piece of the screen. It is a TypeScript class decorated with @Component, which provides a selector used as an HTML tag, a template or templateUrl for the view, styles or styleUrl for scoped CSS, and imports for other standalone components, directives and pipes it uses. The class holds data and event handlers, and the template binds to them.
16

What testing tools are used in Angular projects today?

Save to ▾
Show answer
Angular's CLI has moved to Vitest as the default unit test runner for new projects, replacing the deprecated Karma, while many existing projects still run Karma with Jasmine or have switched to Jest. TestBed configures components and services for tests, HttpTestingController mocks HTTP calls, and component harnesses from the CDK simplify interaction tests. Playwright or Cypress handle end-to-end tests.
17

What are @defer blocks and how do they help performance?

Save to ▾
Show answer
@defer lets you lazy load part of a template and its dependencies only when a trigger occurs, such as on viewport, on interaction, on hover, on idle, on timer or a custom condition with when. Angular automatically splits that code into a separate chunk. You can show @placeholder, @loading and @error blocks. It is ideal for heavy below-the-fold widgets like charts, comments and maps.
18

What are standalone components and why are they now the default?

Save to ▾
Show answer
Standalone components declare their own dependencies in an imports array instead of belonging to an NgModule. Since Angular 19 they are the default, and the CLI generates them without NgModules. They reduce boilerplate, make lazy loading simpler with loadComponent, improve tree shaking and make components easier to understand and test. Applications bootstrap with bootstrapApplication and configure providers in app.config.ts.
19

How do you test an Angular service that makes HTTP calls?

Save to ▾
Show answer
Provide provideHttpClient() and provideHttpClientTesting() in TestBed, then inject the service and HttpTestingController. Call the service method and subscribe, use httpMock.expectOne('/api/products') to capture the request, assert its method and body, and flush a fake response. Finally call httpMock.verify() to ensure no unexpected requests remain. This tests the service logic without a real backend.
20

Load three APIs in parallel with forkJoin and handle a failure in one of them.

Save to ▾
Show answer
Each request gets its own fallback. import { forkJoin, of, catchError } from 'rxjs'; loadDashboard() { return forkJoin({ sales: this.api.getSales().pipe(catchError(() => of(null))), orders: this.api.getRecentOrders().pipe(catchError(() => of([]))), users: this.api.getUserStats().pipe(catchError(() => of(null))) }); } dashboard = toSignal(this.loadDashboard()); // template: @if (dashboard(); as d) { ... d.sales ... } forkJoin emits once, after every inner Observable completes.
21

How do you use Mongoose with TypeScript?

Save to ▾
Show answer
Define a TypeScript interface for the document, then create a Schema typed with that interface and a model with model<IUser>('User', userSchema). Mongoose infers types for queries, so findById returns a typed document. For lean queries, results are plain typed objects. Schema options like timestamps add createdAt and updatedAt, and you can type instance methods, statics and virtuals through additional generic parameters.
22

A form must show fields based on earlier answers, such as company name only when employment type is salaried. How would you build it?

Save to ▾
Show answer
Subscribe to the employment type control's valueChanges, or use a signal, and enable or disable the dependent controls accordingly; disabled controls are excluded from value and validation. Show the fields in the template with @if. For forms driven by configuration, build controls dynamically from a JSON schema into a FormGroup. Remember to clear stale values when a field is hidden.
23

Write a multi-stage Dockerfile that builds Angular and serves it with Nginx.

Save to ▾
Show answer
Build in Node, ship only static files. FROM node:22-alpine AS build WORKDIR /app COPY package*.json ./ RUN npm ci COPY . . RUN npx ng build --configuration production FROM nginx:alpine COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/dist/shop/browser /usr/share/nginx/html EXPOSE 80 The final image contains no Node.js or source code. nginx.conf should include try_files $uri /index.html for Angular routes.
24

Serve the built Angular app and the API from one Express server.

Save to ▾
Show answer
API first, static files next, fallback last. import express from 'express'; import path from 'node:path'; const app = express(); app.use(express.json()); app.use('/api', apiRouter); const dist = path.join(process.cwd(), 'dist/shop/browser'); app.use(express.static(dist, { maxAge: '1y', index: false })); app.get('/*splat', (req, res) => { res.sendFile(path.join(dist, 'index.html')); }); app.listen(process.env.PORT || 3000); The named wildcard follows Express 5 path syntax.
25

What are generics in TypeScript? Give an Angular-related example.

Save to ▾
Show answer
Generics let you write reusable code that works with many types while keeping type safety, using type parameters like T. For example, an ApiResponse<T> interface can wrap any payload, and a service method get<T>(url: string): Observable<T> returns correctly typed data. Angular's HttpClient.get<User[]>() uses generics so the component knows it receives an array of users, without casting.
26

Tell me about a data modelling decision you made and how it worked out.

Save to ▾
Show answer
Situation: in a learning portal, I first embedded all quiz attempts inside each user document. Task: attempts grew quickly and user loads became slow. Action: I moved attempts to their own collection with an index on userId and quizId, kept a small summary of best scores on the user, and wrote a migration script. Result: profile pages became much faster and reporting queries became simpler.
27

Write a cart service using signals with computed totals.

Save to ▾
Show answer
Expose read-only state and mutation methods. @Injectable({ providedIn: 'root' }) export class CartService { private items = signal<CartItem[]>([]); readonly cart = this.items.asReadonly(); readonly count = computed(() => this.items().reduce((n, i) => n + i.qty, 0)); readonly total = computed(() => this.items().reduce((s, i) => s + i.qty * i.price, 0)); add(product: Product) { this.items.update((list) => { const found = list.find((i) => i.id === product.id); return found ? list.map((i) => (i.id === product.id ? { ...i, qty: i.qty + 1 } : i)) : [...list, { ...product, qty: 1 }]; }); } remove(id: string) { this.items.update((l) => l.filter((i) => i.id !== id)); } }
28

What is the difference between PUT and PATCH?

Save to ▾
Show answer
PUT replaces the entire resource with the representation sent, so missing fields may be removed or reset, and it is idempotent. PATCH applies a partial update, changing only the fields provided, such as updating only an order's status. In a MEAN API, PATCH with $set in MongoDB is the common choice for edit forms. Validate PATCH bodies so clients cannot modify protected fields like role or price.
29

An Express endpoint generates a large PDF report and the whole API slows down while it runs. How do you fix it?

Save to ▾
Show answer
PDF generation is CPU-heavy and blocks the event loop. Move it to a background job: the endpoint creates a job in a queue such as BullMQ with Redis and immediately returns 202 Accepted with a job id. A separate worker generates the PDF, uploads it to storage and updates the job status. Angular polls the status or receives a websocket notification, then downloads the file.
30

Define a typed Mongoose model in TypeScript with an instance method.

Save to ▾
Show answer
Interface, methods type and schema together. import { Schema, model, Model } from 'mongoose'; import bcrypt from 'bcrypt'; interface IUser { name: string; email: string; password: string; role: 'user' | 'admin' } interface IUserMethods { comparePassword(plain: string): Promise<boolean> } type UserModel = Model<IUser, {}, IUserMethods>; const userSchema = new Schema<IUser, UserModel, IUserMethods>({ name: { type: String, required: true }, email: { type: String, required: true, unique: true, lowercase: true }, password: { type: String, required: true, select: false }, role: { type: String, enum: ['user', 'admin'], default: 'user' } }, { timestamps: true }); userSchema.method('comparePassword', function (plain: string) { return bcrypt.compare(plain, this.password); }); export const User = model<IUser, UserModel>('User', userSchema);

Tips to crack the Capgemini MEAN Stack interview

  • Practise game-based cognitive tests and pseudocode questions, which are commonly part of Capgemini's online assessment.
  • Prepare a short explanation of your projects, focusing on your role, tools used and what you would improve.
  • Learn about Capgemini's engineering arm and its work in sectors like automotive and financial services to show interest.
  • Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
  • Practise the hard questions on this page aloud; Capgemini interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the Capgemini MEAN Stack interview?

Candidates usually go through 4 stages: Online assessment (pseudocode + English); Game-based aptitude test; Technical interview; HR round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.

Which topics should I prepare for the Capgemini MEAN Stack interview?

This practice set leans on Angular Forms and HTTP Client (6), Node.js and Express APIs (5), Angular Components and Templates (5), MongoDB Data Modelling and Queries (5). Revise those first, then practise explaining one or two of your own projects end to end, because most Capgemini interviewers ask you to walk through real work.

Are these the exact questions asked at Capgemini?

No. These are curated practice questions that match the skills and difficulty usually tested in it services interviews like Capgemini's. They are not a leaked or verified list of past questions.

Where does Capgemini hire MEAN Stack professionals in India?

Capgemini has large teams in Mumbai, Bengaluru, Pune, Chennai, Hyderabad. Openings and locations change often, so check the Capgemini careers page and filter by city and experience.

MEAN Stack questions for similar companies