I use the Xunit2 selenium framework for automated test cases. Some case fails in pipeline. I want to see the attachment of the fail test case in the Test tab. How can I do this using VS test task?

Azure pipelines: How to add failed selenium Xunit test case attachment in VS test task
1k Views Asked by Gkm At
1
There are 1 best solutions below
Related Questions in SELENIUM
- Can't get Selenium element
- Trying to find HREF from table with Selenium in Python
- Python | How i get the link of products that doesn't have href with selenium
- Selenium works only when I'm connected to a remote server
- Logging in automation using Selenium requests / responses- why it wont work?
- Why can't I scrape data from etherscan
- TypeError: 'SwitchTo' object is not callable
- Why driver.get doesn't work in Python Selenium when using Profile
- Trying to fill out an online form using selenium but it can't find the element
- Targeting Accept Policy With Selenium
- Python Selenium - Select Options not returning all the options
- Spraping data from a table is slow but uncertain why
- Unable to convert byte[] image to base64 using cucumber scenario api's - java selenium
- Selenium WebDriver - google account login problem using python
- Click on login button using Selenium
Related Questions in AZURE-DEVOPS
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Error: VS800075 when downloading artifact from another project
- Azure Scale Sets and Parallel Jobs
- Get current Timestamp in CET format and concatenate with string in yml file
- Post-Job Checkout Hanging in Azure DevOps Pipelines
- Referencing yml file from submodule in main pipeline
- Where to find a User Story draft?
- Self Hosted Agent service startup getting failed on VM restart
- Azure pipeline unable to deploy via a bicep file and set values for its parameters
- Dacpac deployment to Azure via SSMS failed: Cannot alter the role db_owner
- NodeJS [Errno 13] Permission denied - Azure DevOps pipleline AWS Lambda deployment
- Share variables across stages in azure pipelines with templates
- Can I move an Azure Data Factory Pipeline to Azure DevOps?
- How to migrate a single workitem in Devops
- Deploy Docker Image into AKS cluster using Azure Release Pipelines with the parameters like clustername, acr, resourcegroup
Related Questions in AZURE-PIPELINES
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Get current Timestamp in CET format and concatenate with string in yml file
- Post-Job Checkout Hanging in Azure DevOps Pipelines
- What changed from xcode 13.2.1 to 14.2 that would affect an app's entitlements?
- Azure pipeline unable to deploy via a bicep file and set values for its parameters
- NodeJS [Errno 13] Permission denied - Azure DevOps pipleline AWS Lambda deployment
- To can I reference the error code of a failed step in an Azure pipeline
- Share variables across stages in azure pipelines with templates
- Deploy Docker Image into AKS cluster using Azure Release Pipelines with the parameters like clustername, acr, resourcegroup
- Getting CI/CD error on biulding step in React Azure Pipeline
- Custom Conditions in Azure Pipelines break ability to cancel
- Why multiple azure pipelines are being triggered although I am triggering only once?
- Devops passing output from one job template step to another job template step
- Integrate Deployment status to Work Items in TFS
- Because my api, after publishing through the AzureDevops pipeline in flurl methods, the entryPointNotFoundException exception is occurring
Related Questions in XUNIT2
- How to use test fixture in a parameterised test in XUnit
- Xunit 1.9.1 to xunit 2.1.0 migeration (IOC / Dependency injection)
- xUnit-cli can't find dotnet on MacOS
- Azure pipelines: How to add failed selenium Xunit test case attachment in VS test task
- getting an error The following constructor parameters did not have matching fixture data: PostgreSqlResource resource
- Why is the Visual Studio 2015/2017/2019 Test Runner not discovering my xUnit v2 tests
- Customize Test Name in Xunit2
- xUnit.net v2 not discovering .NET Core Tests in Visual Studio 2015
- MemberData tests show up as one test instead of many
- XUnit Class Fixture (IClassFixture) is being executed twice
- C# each attribute should execute the TestMethod
- AutoFixture, xUnit: Setup TypeRelays and inject service in constructor
- How do I remove AfterMap from Automapper Profiles
- xUnit - What is the maximum number of parallel tests that can run in xUnit?
- AutoFixture AutoDataAttribute Customization Beyond Derived Attribute
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The option
publishRunAttachments: true, it will update attachments to Test run attachment tab, check the pic belowAfter the VS test task runs, we can get the run ID through the variable
VSTEST_TESTRUNID.Then we could call the RESST API Create Test Result Attachment to add attachments to the test result attachment tab.
Request API:
Request Body:
You could also check this thread
Update1
We could add task power shell and call the rest api via below script:
Update2
Check the pic below and notice the URL
According to the screenshot you shared before, it seems that you want to add attachments to the test run instead of test result. So we just need test run ID and we could get the test run ID from variable after the task vs test ends.
If you want to add attachments to test result, we could list all test result via test run ID.
Sample URL:
The add attachments to the test result via test result ID and test run ID.
Sample power shell script to list all test result ID
Update3
Update4
If I click on .png file, it shows nothing.