jimmymcp / al-test-runner

VS Code Extension to help run AL tests against Business Central container
https://jpearson.blog/al-test-runner-for-visual-studio-code/
MIT License
11 stars 16 forks source link

CodeLense for Test coverage and Code coverage #129

Open MaxFalcone opened 6 months ago

MaxFalcone commented 6 months ago

I'm on version 0.10.3

  1. Code coverage percent is shown for methods but not for triggers image
  2. I've not managed to get "Show X tests" action to show up. Like you have in documentation. See screenshot above, I have no such actions. Command Show related tests doesn't do anything either. This feature is the reason I came across your great extension and started using it. What do I need to do? image The testCoverage.json file is always empty array or look like this after a full tests run. image
  3. If I understang correctly, coverage % is only shown if I run all rtests at once. If yes, then it might be worth mentioning somwhere in docu. But then coverage might be calculated wrong. 3.1. Here I run only one test codeunit (54005) image 3.2. Here I run the other codeunit (54007) image 3.3 Here I run both of them at once (54005 and 54007). See that code coverage is shown for the latest one only (54007). image
  4. One more thing. Code coverage is not shown if the app being tested is the Base App (sources of it). Do you have any restrictions in extension for this?
MaxFalcone commented 6 months ago

Hi, I think I found out why I'm not getting codelens for test coverage on start. There is an error when extension is activated. image Error happens in this line. I'm not very familiar to TS, but I changed code to look more like code coverage and it worked. image image Could you please fix it properly?