Playwright + Azure Pipeline | Playwright Tutorial - Part 74

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 114

  • @kunarapupriyanka9107
    @kunarapupriyanka9107 3 месяца назад +1

    Super helpful, Thankyou.

    • @letcode
      @letcode  3 месяца назад

      Welcome 🤗

  • @CodeFreak1981
    @CodeFreak1981 2 года назад +2

    Great Video bro! I think this video answered all my questions that I have been looking for. I really appreciate all the hard work you put into the videos that you create.

    • @letcode
      @letcode  2 года назад

      Thanks bro :)

  • @rajeshmani2620
    @rajeshmani2620 2 года назад +1

    Thanks Koushik, I was exactly looking for this information

    • @letcode
      @letcode  2 года назад

      Welcome 😀

  • @nerijuslinkevicius6540
    @nerijuslinkevicius6540 2 года назад +1

    this is exactly what I have been looking for for a long time, many tnx :)

    • @letcode
      @letcode  2 года назад

      Welcome 😊

  • @safdarsohail
    @safdarsohail 2 года назад +1

    even when i request you for this video , i fixed in 2 days but great work man

  • @thomasedison2806
    @thomasedison2806 2 года назад +1

    Great work for this playwright playlist!

    • @letcode
      @letcode  2 года назад

      Thanks buddy ☺️

  • @sivareddychepuri9260
    @sivareddychepuri9260 2 года назад +1

    Hi Koushik, html reports is not displaying under Published HTML tab as shown in the tab.
    JmeterReportsPath parameter value need to be passed for publishhtmlreport??. I think JmeterReportsPath parameter available in the latest Azure Devops, it is showing in your video

    • @letcode
      @letcode  2 года назад

      U have to add that html report plugin.

    • @sivareddychepuri9260
      @sivareddychepuri9260 2 года назад +1

      @@letcode In Agent machine???

    • @letcode
      @letcode  2 года назад

      @@sivareddychepuri9260 yeah, from azure project settings

  • @srinivasqa2021
    @srinivasqa2021 Год назад +1

    Hi koushik,I already have the pipeline ready and when I click on edit pipeline…I can see YAML,variables ,triggers,history but I don’t see the tasks tab to add the HTML reporter. Why is it missing. Do I need to enable it somewhere or should I need to get sort of permission from my manager to get it displayed ?

    • @letcode
      @letcode  Год назад

      I am not sure about it. I guess by default it should come.

  • @cocolucio
    @cocolucio Год назад +1

    hi! I have hundreeds of scripts classified by category with playwright, is there any way I can just run a specific category on the azure pipeline insetad of running everthing on each build?

    • @letcode
      @letcode  Год назад

      Did u try tags from the command line argument?

  • @hinerron
    @hinerron 2 года назад +1

    Super helpful thank you

    • @letcode
      @letcode  2 года назад

      Glad you like it ☺️

  • @swatimaheshwari6521
    @swatimaheshwari6521 2 года назад +2

    Great video. I had a question though. Why would we integrate e2e tests with the build pipeline and not release pipeline instead. (post relealse mostly to check if code deployde to production is working all fine or not)

    • @letcode
      @letcode  2 года назад

      Thanks,
      You can do it in the release pipeline as well.
      But no need to run every tests, just the smoke in the production will make sense.

    • @swatimaheshwari6521
      @swatimaheshwari6521 2 года назад +1

      ​@@letcode Thank you for the prompt reply.
      But the intention of e2e tests is to verify regression in code getting deployed right. With testing in build pipeline, we won't achieve it. It will just verify if the code already deployed in production is working all good or not.

    • @letcode
      @letcode  2 года назад +1

      Depending on the application, for instance in my application testers should not create any data.
      So we do only the smoke in the product and our e2e run against the dev and staging.

  • @cferreira1989
    @cferreira1989 10 месяцев назад +1

    I noticed if I used Other Git instead of Github I don't see the option to publish html report. As maximum I am able to attach the index.html report to an artifact which is published within the pipeline execution

    • @letcode
      @letcode  10 месяцев назад

      I don't think that is because of git.
      Because the html report is standalone.

    • @cferreira1989
      @cferreira1989 10 месяцев назад +1

      @@letcode i guess is related i am using azure dev ops git instead of gitbub. Not actual git itself but git form azure dev ops

  • @sivareddychepuri9260
    @sivareddychepuri9260 2 года назад +1

    Hi Koushik, how to run Particular Testcase from Pipeline not from Config file
    We need to add Variable??

    • @letcode
      @letcode  2 года назад

      Yes, from the variable we can achieve it.

  • @andreaskarz
    @andreaskarz Год назад +1

    Hi Koushik - I have one little question. When I run selenium tests with Specflow, I see a tab "Tests" in the Pipeline and there is a lsit with all the tests and also a history. Is this also possible with Playwright?

    • @letcode
      @letcode  Год назад

      Hi, yes it is similar only.

    • @andreaskarz
      @andreaskarz Год назад

      @@letcode I have test it but no tab with "Tests" 😞

  • @valerietiyiselani6049
    @valerietiyiselani6049 2 года назад +1

    Hi Koushik , am still struggling to get this to work? all my test run locally but doesnt execute on the pipeline even though the pipeline run and its have no errors? pls help

    • @letcode
      @letcode  2 года назад +1

      Ok, I'll try to connect with u this weekend.

  • @Tej-ds1zc
    @Tej-ds1zc 8 месяцев назад +1

    Hi Koushik, How we can do this pipeline setup for playwright java ? we have repos in azure devops itself. How can we get JSON or Config file ?

    • @letcode
      @letcode  8 месяцев назад +1

      You have to configure from the maven.xml.

    • @Tej-ds1zc
      @Tej-ds1zc 8 месяцев назад

      @@letcodeCan you give any reference koushik

    • @Tej-ds1zc
      @Tej-ds1zc 8 месяцев назад

      @@letcode Thanks koushik. I have implemented using maven POM.xml.

  • @maopuerta3430
    @maopuerta3430 2 года назад

    The best Koushik.

    • @letcode
      @letcode  2 года назад

      Thanks you Mao ☺️

  • @MohanVenugopal
    @MohanVenugopal Год назад +1

    Hi Koushik,
    When I try to add the publish HTML report in the Azure pipeline and trigger an execution. I'm unable to see the report in the HTML Viewer tab. I'm able to see the tab created but reports are not getting displayed in the tab.
    Do you have any updates on this?

    • @letcode
      @letcode  Год назад

      Hi, i have received the same comments a few times, I'll check and get back to you this weekend.

    • @MohanVenugopal
      @MohanVenugopal Год назад

      @@letcode Thanks for the update.

    • @user-ux9nz2bz5s
      @user-ux9nz2bz5s Год назад +1

      any updates ?

    • @letcode
      @letcode  Год назад

      @user-ux9nz2bz5s no issues from my side

  • @praveen-Vlog
    @praveen-Vlog 6 месяцев назад +1

    Hi ji not moving on another task in our script is passed but not moved ...

    • @praveen-Vlog
      @praveen-Vlog 6 месяцев назад

      Please give me any suggestions bro. Because out the terminal.

  • @Sxhj-425
    @Sxhj-425 Год назад +1

    Hi Koushik and All, Hope you doing well, In this video you clearly explained how to create CICD for playwright by installing dependencies. In my case I need to execute the power shell script that is: pwsh bin/Debug/net6.0/playwright.ps1 install when I tried running over the azure pipeline im getting some error which is: The argument 'bin/Debug/net6.0/playwright.ps1' is not recognized as the name of a script file. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. is there anything will you suggest how to run this command over the azure pipeline

    • @letcode
      @letcode  Год назад

      Hi.
      Not sure how the .net files get executed..

  • @siluvaibabilas6396
    @siluvaibabilas6396 8 месяцев назад +1

    Great infromation. how to download the external npm package with .npmrc file when executing the npm install
    this npmrc file located near to package.json and have the registry link.
    package name is given in dependencies section,

    • @letcode
      @letcode  8 месяцев назад

      Thanks, not sure I haven't used that.

  • @ChaitanyaVarma-e2c
    @ChaitanyaVarma-e2c Год назад +1

    Hey Koushik, thanks for the video. New to playwright reporting - Is it possible to drop the test report HTML file into the artifacts section of Azure programmatically via yaml code?

    • @letcode
      @letcode  Год назад

      Hi, yes i guess but i haven't tried.
      I did on circle ci.

    • @debasisnath4558
      @debasisnath4558 11 месяцев назад

      Hi koushik any setting requird in package.json as for me it is not working with no error

  • @sivareddychepuri9260
    @sivareddychepuri9260 2 года назад +1

    Hi Koushik, Thanks for this video.
    How to add Visual Studio Test for Agent Job.??
    We dont have dll files for this code??

    • @letcode
      @letcode  2 года назад

      Dll is only for c# right ?
      I'm using a typescript project here so not required.

  • @agnelrayan1
    @agnelrayan1 Год назад

    Hi Koushik, thank you for the video, I want to integrate Maven+Java+Play Wright+Allure Report +Azure combination, but Allure Report is showing error in the Devops, can you help me in this? Allure: Target directory C:\allure-results for the report is already in use, add a '--clean' option to overwrite

    • @letcode
      @letcode  Год назад

      I haven't used the Allure, so I am not sure about it.

  • @akshaypramodpai7736
    @akshaypramodpai7736 2 года назад

    Awesome was waiting for this

  • @NandhiniR-x6z
    @NandhiniR-x6z 11 месяцев назад +1

    Can we run on Linux operating system, Any specific configuration required to run on linux operating system?

    • @letcode
      @letcode  11 месяцев назад

      No changes required, you can choose the os as Linux.

  • @supriyareddy2998
    @supriyareddy2998 2 года назад +1

    Hi Koushik, how to configure Testcase id in Pipeline level i.e. If I have mention testcase id or testsuite in pipeline build, those tcs are should be run..??
    In this video Running the testcase from config file.

    • @letcode
      @letcode  2 года назад +1

      Pipiline paramerts concept has to be used. I will make a video.

  • @AlonaLos
    @AlonaLos Год назад +1

    HI! Thanks for the vide. It is very helpful. I'm getting the following error: npm ERR! enoent ENOENT: no such file or directory, open 'C:\a\1\s\package.json' Could you suggest how to resolve it.

    • @letcode
      @letcode  Год назад

      I guess you have given the wrong path.

  • @kishoreyadav9317
    @kishoreyadav9317 2 года назад +1

    Is it possible to provide support for updating test results(each test step with results) in Azure DevOps Test Plans ??

    • @letcode
      @letcode  2 года назад

      Not sure about it

  • @danielkovacs3664
    @danielkovacs3664 2 года назад +1

    how can i found this extension "publish html report" i found only "publish html reports"

    • @letcode
      @letcode  2 года назад +1

      Both same I guess, i will share the link.

  • @safdarsohail
    @safdarsohail 2 года назад +1

    can you help out how can we not push passwords on github and use some CI enveriomental variables to login on url

    • @letcode
      @letcode  2 года назад

      For that we can use the environment variables in git and azure as well.
      I will create a video.

  • @valerietiyiselani6049
    @valerietiyiselani6049 2 года назад +2

    Hi My test still doesn't execute, it passes but doesnt show the test what could be possiblt wrong

    • @letcode
      @letcode  2 года назад

      is it running in the local?

    • @valerietiyiselani6049
      @valerietiyiselani6049 2 года назад +1

      @@letcode Yes it does run local but when i have pushed my test to the branch and run my pipeline it runs and not sure the test.

    • @letcode
      @letcode  2 года назад

      It will execute but the browser won't be visible.
      Did u get any console message ?

    • @valerietiyiselani6049
      @valerietiyiselani6049 2 года назад

      @@letcode Yes i wasnt excepting a browser to open. but to see the test cases like you have , i have no error message.

  • @deepakraj5352
    @deepakraj5352 Месяц назад +1

    Can this be done for playwright with cucumber?

    • @letcode
      @letcode  Месяц назад

      It should as we have used node js
      Call the appropriate script tag

  • @juliusortiz8606
    @juliusortiz8606 Год назад +1

    Can you attach screenshot per tests?

    • @letcode
      @letcode  Год назад

      I have already covered this. Pls check the playlist.

  • @punyaiathwale6483
    @punyaiathwale6483 2 года назад +1

    I have kept all my testscript.spec.js files under tests folder of playwright project , also in playwright.config.js file mentioned testDir: './tests',: But still I am facing below error while executing testcases thru npm cutom task : [command]C:\Windows\system32\cmd.exe /D /S /C "C:\agent\_work\_tool
    ode\18.6.0\x64
    pm.cmd run ./tests/*.spec.js"
    2022-07-19T14:05:35.3088640Z npm ERR! Missing script: "./tests/*.spec.js" , Can you please suggest a solution?

    • @letcode
      @letcode  2 года назад

      I use test match, I'll check the test dir option.

  • @supriyareddy2998
    @supriyareddy2998 2 года назад +1

    Hi Koushik,
    I am able generate html reports Locally,
    When comes to Pipeline Getting Empty screen, Not able to view Html reports Under PublishhtmlReport Tab and
    Getting Description for Agent job command window like 'This task can be used to publish html reports to azdo. Currently Jmeter HTML reports are being transformed to be consumed into Azdo directly'

    • @letcode
      @letcode  2 года назад

      Which plugin u used to publish html?

    • @supriyareddy2998
      @supriyareddy2998 2 года назад +1

      @@letcode I have not used any plugin. Please suggest plugin name and How to install

    • @letcode
      @letcode  2 года назад

      @@supriyareddy2998 in this video itself i have explained bro

    • @supriyareddy2998
      @supriyareddy2998 2 года назад +1

      @@letcode Sorry Koushik, I have used Publishhtmreport task to Agent Job and I have not used any plugin.
      I have observed that there is no Plugin in this video.
      Can you please give html plugin name

    • @letcode
      @letcode  2 года назад

      @@supriyareddy2998 yeah meant the task only.

  • @danielkovacs3664
    @danielkovacs3664 2 года назад +1

    I am able tu run from pipeline, but one step is fail, the pipeline does not stopr just after the run timeout run .
    so the test execution step is fail
    Terminate batch job (Y/N)?
    ##[error]The operation was canceled.
    Finishing: CmdLine
    , but the pipeline is continue

    • @letcode
      @letcode  2 года назад

      In my case if there is any failure it's stops the execution

    • @danielkovacs3664
      @danielkovacs3664 2 года назад

      hi Koushik
      it ismy yml:
      name: ci
      variables:
      VERSION: 7.2
      timezone: Europe/Budapest

      pool:
      vmImage: 'windows-latest'
      workingDir: '$(service_path)'
      schedules:
      - cron: "0 3 * * Mon-Fri"
      displayName: M-F 3:00 AM (UTC) daily build
      branches:
      include:
      - main
      always: true
      jobs:
      - job: AutomatedTests
      timeoutInMinutes: 30 # how long to run the job before automatically cancelling
      cancelTimeoutInMinutes: 33 # how much time to give 'run always even if cancelled tasks' before killing them
      steps:
      - task: NodeTool@0
      inputs:
      versionSpec: '14.x'
      displayName: 'Install Node.js'
      - script: which node
      displayName: "Install framework"
      - script: npm i && npx playwright install
      #- script: npx playwright install --with-deps
      displayName: "Execute test"
      condition: succeeded()
      - script: npm run smoke
      - task: PublishHtmlReport@1
      condition: succeededOrFailed()
      inputs:
      reportDir: 'playwright-report/index.html'
      - task: CopyFiles@1
      condition: succeededOrFailed() # Run task even if previous ones fail
      inputs:
      #leave it empty, the copying is done from the root folder
      #sourceFolder: '$(Build.SourcesDirectory)/_daniavander_hydro-test/playwright-report'
      contents: |
      playwright-report/**
      screenshot/**
      test-results/**
      targetFolder: '$(Build.ArtifactStagingDirectory)'
      - task: PublishBuildArtifacts@1
      condition: succeededOrFailed()
      displayName: 'Publish Artifact: drop'
      inputs:
      PathtoPublish: '$(Build.ArtifactStagingDirectory)'
      executed the tests:
      4 failed
      6 passed (9m)
      Serving HTML report at 127.0.0.1:9323. Press Ctrl+C to quit.
      Terminate batch job (Y/N)?
      ##[error]The operation was canceled.
      Finishing: CmdLine
      and the steps after cmdline
      PublishHtmlReport, CopyFiles, PublishBuildArtifacts do not execute, but i do not why

    • @testihenkilo6911
      @testihenkilo6911 2 года назад +3

      You need to make sure the environment variable CI is equal to true. If Playwright sees CI=true it will not hang after the test results. Here is the command with a Windows container. It's a bit different with Linux.
      - task:
      CmdLine@2
      inputs:
      script: 'set CI=true && echo %CI% && npx playwright test'

    • @ketanpardeshi
      @ketanpardeshi 2 года назад +1

      @@testihenkilo6911 Thank you bro you have saved my day. :)

  • @ninadk1682
    @ninadk1682 Год назад +1

    Can you please post video for sending mail after execution on local as well as azure pipeline

  • @danielkovacs3664
    @danielkovacs3664 2 года назад +1

    I totally follow your steps, but do not start execute test
    "
    ; HOME = C:\Users\VssAdministrator
    ; Run `npm config ls -l` to show all defaults.
    C:\Windows\system32\cmd.exe /D /S /C "C:\hostedtoolcache\windows
    ode\16.16.0\x64
    pm.cmd run smoke"
    ##[error]The operation was canceled.
    Finishing: Execute test
    "

    • @letcode
      @letcode  2 года назад

      What are the commands u used?

    • @danielkovacs3664
      @danielkovacs3664 2 года назад +1

      @@letcode I do not know what is the problem, but when i build the pipeline with the original method (yml file) it is ok

  • @testihenkilo6911
    @testihenkilo6911 2 года назад +1

    Thanks for sharing your tips. Tried running Playwright with Azure Pipelines but most of the tests fail with: "page.goto: net::ERR_CONNECTION_RESET". Everything works fine locally.
    Also you run "run test" -> have you scripted that, if yes what commands are behind the script?

    • @letcode
      @letcode  2 года назад

      Yeah i have used the script tag, you can find that in my git repo.
      Connection reset means u sure your application was up and running that time.

  • @teamdacskami
    @teamdacskami Год назад +1

    please help
    error on installing playwright
    npm ERR! code ENOENT
    npm ERR! syscall open
    npm ERR! path D:\a\1\s/package.json
    npm ERR! errno -4058
    npm ERR! enoent ENOENT: no such file or directory, open 'D:\a\1\s\package.json'
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent
    npm ERR! A complete log of this run can be found in:
    npm ERR! C:
    pm\cache\_logs\2023-07-21T06_13_12_175Z-debug-0.log
    ##[error]Cmd.exe exited with code '-4058'.
    Finishing: Install Playwright test

    • @letcode
      @letcode  Год назад

      It's folder related issues.
      Create a folder on the desktop then proceed with the installation.

    • @teamdacskami
      @teamdacskami Год назад +1

      @@letcode just an empty folder?

    • @letcode
      @letcode  Год назад

      ruclips.net/video/AdFgipIPAlg/видео.html

    • @teamdacskami
      @teamdacskami Год назад +1

      @@letcode thank you so much!

    • @teamdacskami
      @teamdacskami Год назад

      @@letcode same error in azure devops pipeline, installing playwright