Rayrun
← Back to Discord Forum

How to run test in VS code extension by there tags?

bronzebearduaposted in #help-playwright
Open in Discord
bronzebeardua
bronzebeardua

I have a set of test that have a specific tag in the there name (@smoke for example) I know that you can run them from the console via -g/--grep parameter but how do you do that in extension?

This thread is trying to answer question "How to run tests in a VS code extension using specific tags?"

9 replies
play.wright_71287

I have the same question. When I try and seach with the @tag in the extension, it doesnt work.

play.wright_71287

the test explorer seems to imply it will work.

image.png
play.wright_71287

reply to myself (after creating an account to answer my own question). The problem is the ui implies that you should put the @symbol as a part of your query... BUT the @symbol is a special character n the filter.

image.png

could use 'tag_xxx' -g is a regex after all..

play.wright_71287

@d3333333 , thanks for the reply. If you have a minute, can you point me at any doc or examples to take this further? (I am trying to do an additive filter, like to find a testcase that has more than one tag , like @regression and @level1

image.png
play.wright_71287

I think I get what you mean. by Adding another thing called "tag_regression" it is searchable in the testexplorer like I expected. I was hoping to use the tag itself to avoid duplication of effort. I have raised an improvement in the project in github.

should be able as it is a regex ".+tag_(bvt|smoke|integration|full|login|customer).*" would run any test with:

tag_bvt tag_smoke tag_... -- for those in your regex

i was thnking from the comandline, looks like the vs code extension you can't use a regex.... seems lame. I have to run my tests in docker and from the command line... sorry for the confusion

play.wright_71287

@d3333333 , thanks for your reply. I appreciate your thoughts.

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].