Playwright + Azure Pipeline | Playwright Tutorial - Part 74

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ธ.ค. 2024

ความคิดเห็น • 114

  • @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 :)

  • @nerijuslinkevicius6540
    @nerijuslinkevicius6540 2 ปีที่แล้ว +1

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

    • @letcode
      @letcode  2 ปีที่แล้ว

      Welcome 😊

  • @rajeshmani2620
    @rajeshmani2620 2 ปีที่แล้ว +1

    Thanks Koushik, I was exactly looking for this information

    • @letcode
      @letcode  2 ปีที่แล้ว

      Welcome 😀

  • @kunarapupriyanka9107
    @kunarapupriyanka9107 5 หลายเดือนก่อน +1

    Super helpful, Thankyou.

    • @letcode
      @letcode  5 หลายเดือนก่อน

      Welcome 🤗

  • @safdarsohail
    @safdarsohail 2 ปีที่แล้ว +1

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

    • @letcode
      @letcode  2 ปีที่แล้ว

      Great 👍

  • @thomasedison2806
    @thomasedison2806 2 ปีที่แล้ว +1

    Great work for this playwright playlist!

    • @letcode
      @letcode  2 ปีที่แล้ว

      Thanks buddy ☺️

  • @akshaypramodpai7736
    @akshaypramodpai7736 2 ปีที่แล้ว

    Awesome was waiting for this

    • @letcode
      @letcode  2 ปีที่แล้ว

      Cool 😎

  • @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.

  • @hinerron
    @hinerron 2 ปีที่แล้ว +1

    Super helpful thank you

    • @letcode
      @letcode  2 ปีที่แล้ว

      Glad you like it ☺️

  • @cferreira1989
    @cferreira1989 ปีที่แล้ว +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  ปีที่แล้ว

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

    • @cferreira1989
      @cferreira1989 ปีที่แล้ว +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

  • @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?

  • @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

  • @maopuerta3430
    @maopuerta3430 2 ปีที่แล้ว

    The best Koushik.

    • @letcode
      @letcode  2 ปีที่แล้ว

      Thanks you Mao ☺️

  • @praveen-Vlog
    @praveen-Vlog 8 หลายเดือนก่อน +1

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

    • @praveen-Vlog
      @praveen-Vlog 8 หลายเดือนก่อน

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

  • @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 ปีที่แล้ว

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

  • @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 11 หลายเดือนก่อน +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  11 หลายเดือนก่อน +1

      You have to configure from the maven.xml.

    • @Tej-ds1zc
      @Tej-ds1zc 10 หลายเดือนก่อน

      @@letcodeCan you give any reference koushik

    • @Tej-ds1zc
      @Tej-ds1zc 10 หลายเดือนก่อน

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

  • @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.

  • @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.

  • @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.

  • @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.

  • @andreaskarz
    @andreaskarz 2 ปีที่แล้ว +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  2 ปีที่แล้ว

      Hi, yes it is similar only.

    • @andreaskarz
      @andreaskarz 2 ปีที่แล้ว

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

  • @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..

  • @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.

  • @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

  • @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.

  • @MohanVenugopal
    @MohanVenugopal 2 ปีที่แล้ว +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  2 ปีที่แล้ว

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

    • @MohanVenugopal
      @MohanVenugopal 2 ปีที่แล้ว

      @@letcode Thanks for the update.

    • @user-ux9nz2bz5s
      @user-ux9nz2bz5s ปีที่แล้ว +1

      any updates ?

    • @letcode
      @letcode  ปีที่แล้ว

      @user-ux9nz2bz5s no issues from my side

  • @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.

  • @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.

  • @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.

  • @juliusortiz8606
    @juliusortiz8606 ปีที่แล้ว +1

    Can you attach screenshot per tests?

    • @letcode
      @letcode  ปีที่แล้ว

      I have already covered this. Pls check the playlist.

  • @NandhiniR-x6z
    @NandhiniR-x6z ปีที่แล้ว +1

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

    • @letcode
      @letcode  ปีที่แล้ว

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

  • @siluvaibabilas6396
    @siluvaibabilas6396 10 หลายเดือนก่อน +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  10 หลายเดือนก่อน

      Thanks, not sure I haven't used that.

  • @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.

  • @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.

  • @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. :)

  • @deepakraj5352
    @deepakraj5352 4 หลายเดือนก่อน +1

    Can this be done for playwright with cucumber?

    • @letcode
      @letcode  4 หลายเดือนก่อน

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

  • @ninadk1682
    @ninadk1682 ปีที่แล้ว +1

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

    • @letcode
      @letcode  ปีที่แล้ว

      I'll try

  • @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

  • @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  ปีที่แล้ว

      th-cam.com/video/AdFgipIPAlg/w-d-xo.html

    • @teamdacskami
      @teamdacskami ปีที่แล้ว +1

      @@letcode thank you so much!

    • @teamdacskami
      @teamdacskami ปีที่แล้ว

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

  • @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.