Playwright API testing - Typescript | CRUD API | GET, POST, PUT, DELETE | Complete Tutorial

Поділитися
Вставка
  • Опубліковано 6 лют 2025

КОМЕНТАРІ • 8

  • @letcode
    @letcode Рік тому

    Good video brother ❤

  • @prabhakaranv7894
    @prabhakaranv7894 11 місяців тому

    Thank you so much for sharing this video. This is really helpful for beginners
    How do I pass basic authentication in POST request?

    • @InvolveInInnovation
      @InvolveInInnovation  11 місяців тому

      In the playwright.config.ts you can add the Authorization, That will be available for all the requests
      ```
      import { defineConfig, devices } from '@playwright/test';
      export default defineConfig({
      testDir: './tests',
      expect: {
      timeout: 5000
      },
      /* Run tests in files in parallel */
      fullyParallel: true,
      forbidOnly: !!process.env.CI,
      retries: process.env.CI ? 2 : 0,
      workers: process.env.CI ? 1 : undefined,
      reporter: 'html',
      use: {
      baseURL:'localhost:5000',
      /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
      actionTimeout: 0,
      /* Base URL to use in actions like `await page.goto('/')`. */
      // baseURL: 'localhost:3000',
      trace: 'on-first-retry',
      'Authorization': __value_here__,
      extraHTTPHeaders:{
      }
      },
      });
      ```

  • @dsong2006
    @dsong2006 11 місяців тому

    what do you do when you have 2 baseURL for the same env, like baseURL1 and baseURL2?

  • @rameshbabu2104
    @rameshbabu2104 Рік тому

    Can u convert this test into an API test in cucumber format it will be helpful

  • @jayanthiaugustin9715
    @jayanthiaugustin9715 Рік тому

    Thanks

  • @PoornimaNagesh-t4e
    @PoornimaNagesh-t4e Рік тому +1

    would you please attach link to git repo for this