Closed BramManuel closed 1 year ago
Hi I like your idea. I did not know about test explorer API. Great improvement 👍. I will have a look at it after my vacation
@BramManuel Awesome. I think the idea is great. I am currently review the code and also read the documentation of the api. I would also have a few improvements, for example to improve the performance. I will simply add notes to this PR. Is it ok with you, if I commit code directly into your pull request?
Yea, off course you can commit to the pr! I am here to learn, and typescript is new for me 😉 if I can help with something, let me know!
Thanks again for the PR and the tip about the interface. I will merge the PR as it is. My changes I will convert only afterwards, because I still want to implement the lazy loading.
I have been working on it all weekend, it's a version 1, so I would love your opinion and feedback.
140
Future improvements
There are a couple of TODO's and future improvements
Demo
Note: The code-workspace file is not required if you have a .vscode folder.
Open Explorer
First we open the test explorer, the handler will look up all the tests in the workspace. We look for the following files (.http,.md,.adoc).![OpenTestExplorer](https://user-images.githubusercontent.com/27723033/179833825-cdcdcef1-da57-4cea-87d8-0ff67a4584d3.gif)
Run All
From here, we can click the run all button to run all the found tests. Look at the top of the explorer, it lists all the run total succeeded and failed tests.![RunAll](https://user-images.githubusercontent.com/27723033/179834037-366eb1f4-13a2-4a6e-9f56-855915052b2d.gif)
Show children HTTP regions
Then we open one file in the explorer to see all the HTTP regions that have been run. You see that some tests have failed, succeed or skipped. Tests that have been skipped have no tests within the region.![ShowList](https://user-images.githubusercontent.com/27723033/179834223-5160333d-bdcf-4c19-a533-1ca4b1359ff7.gif)
Go to Test
Let's take a look at a test that has succeeded.![GoToTest](https://user-images.githubusercontent.com/27723033/179834802-525315da-c162-44ed-a72d-da8329795d2e.gif)
Show test fail reason
And let's have a look at a failed test. This test has 2 assertions. 1 of them fails. Here you see the output of a test:![LookAtFailed](https://user-images.githubusercontent.com/27723033/179835109-f60a0766-81f0-450b-8b3b-a47739ff83ec.gif)
Give test a name
There are also a couple of file hooks implemented here we change the name of the HTTP region it immediately gets reflected to the explorer, the same goes for tests.![GiveHttpRegionName](https://user-images.githubusercontent.com/27723033/179835337-15b416ce-6a8c-4f70-9cda-ee961baf8090.gif)
Create File
And we want to create and delete files, when we do the explorer should react to it: On Creation:
Delete File