Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Run All #86

Closed
urasandesu opened this issue Dec 12, 2016 · 4 comments
Closed

Support Run All #86

urasandesu opened this issue Dec 12, 2016 · 4 comments

Comments

@urasandesu
Copy link
Owner

Currently, Prig cannot execute Run All that is at Test Explorer in the solution that has multiple test projects.
If enabling that, usability is definitely improved.

@urasandesu
Copy link
Owner Author

TODO

  • Reinvestigation: Can VSIX detect the state whether user selects Run All?
    • If it is true, VSIX can set the output path and the test assembly path of all test projects that have Prig Assembly to the environment variable URASANDESU_PRIG_CURRENT_DIRECTORY.
    • Then, Prig can trace Prig Assemblies from it and can collect all IndirectableAttribute.
  • Finally, just implement the processing to merge IndirectableAttribute information if they have the difference between each test projects.

@urasandesu
Copy link
Owner Author

How to hook before command execution

The following article is helpful:

NOTE: Storing CommandEvents to field is important. Otherwise, it will be unintendedly released by GC and it will be never notified. About the details, see this QA.

How to get command GUID and ID

GUID and ID are required to identify the command we want to hook. To get them, select TOOLS - Options... menu, and check the command that contains "TestExplorer" in Environment - Keyboard tree. Then, execute $DTE.Commands.Item(<the command name>) in Package Manager Console. For example, Run All and Run Tests have the following results:

PM> $DTE.Commands.Item('TestExplorer.RunAllTests')

Name          : TestExplorer.RunAllTests
Collection    : System.__ComObject
DTE           : System.__ComObject
Guid          : {1E198C22-5980-4E7E-92F3-F73168D1FB63}
ID            : 784
IsAvailable   : True
Bindings      : {Global::Ctrl+R, A}
LocalizedName : TestExplorer.RunAllTests


PM> $DTE.Commands.Item('TestExplorer.RunAllTestsInContext')

Name          : TestExplorer.RunAllTestsInContext
Collection    : System.__ComObject
DTE           : System.__ComObject
Guid          : {1E198C22-5980-4E7E-92F3-F73168D1FB63}
ID            : 885
IsAvailable   : True
Bindings      : {Global::Ctrl+R, T}
LocalizedName : TestExplorer.RunAllTestsInContext

@oldhamir
Copy link

Ideally wouldn't we support all of the Test -> Run... and the Test->Debug... options?

@urasandesu
Copy link
Owner Author

@oldhamir Yes, we are planning to support all operations to run tests. The Test -> Run... and the Test->Debug... options are also true. Here is the complete list of them:

Name          : TestExplorer.RunSelectedTests
Collection    : System.__ComObject
DTE           : System.__ComObject
Guid          : {1E198C22-5980-4E7E-92F3-F73168D1FB63}
ID            : 785
IsAvailable   : True
Bindings      : {}
LocalizedName : TestExplorer.RunSelectedTests

Name          : TestExplorer.RunAllTests
Collection    : System.__ComObject
DTE           : System.__ComObject
Guid          : {1E198C22-5980-4E7E-92F3-F73168D1FB63}
ID            : 784
IsAvailable   : True
Bindings      : {Global::Ctrl+R, A}
LocalizedName : TestExplorer.RunAllTests

Name          : TestExplorer.RunFailedTests
Collection    : System.__ComObject
DTE           : System.__ComObject
Guid          : {1E198C22-5980-4E7E-92F3-F73168D1FB63}
ID            : 834
IsAvailable   : True
Bindings      : {}
LocalizedName : TestExplorer.RunFailedTests

Name          : TestExplorer.RunNotRunTests
Collection    : System.__ComObject
DTE           : System.__ComObject
Guid          : {1E198C22-5980-4E7E-92F3-F73168D1FB63}
ID            : 835
IsAvailable   : True
Bindings      : {}
LocalizedName : TestExplorer.RunNotRunTests

Name          : TestExplorer.RunPassedTests
Collection    : System.__ComObject
DTE           : System.__ComObject
Guid          : {1E198C22-5980-4E7E-92F3-F73168D1FB63}
ID            : 833
IsAvailable   : True
Bindings      : {}
LocalizedName : TestExplorer.RunPassedTests

Name          : TestExplorer.RepeatLastRun
Collection    : System.__ComObject
DTE           : System.__ComObject
Guid          : {1E198C22-5980-4E7E-92F3-F73168D1FB63}
ID            : 836
IsAvailable   : True
Bindings      : {Global::Ctrl+R, L}
LocalizedName : TestExplorer.RepeatLastRun

Name          : TestExplorer.DebugSelectedTests
Collection    : System.__ComObject
DTE           : System.__ComObject
Guid          : {1E198C22-5980-4E7E-92F3-F73168D1FB63}
ID            : 801
IsAvailable   : True
Bindings      : {}
LocalizedName : TestExplorer.DebugSelectedTests

Name          : TestExplorer.DebugAllTests
Collection    : System.__ComObject
DTE           : System.__ComObject
Guid          : {1E198C22-5980-4E7E-92F3-F73168D1FB63}
ID            : 789
IsAvailable   : True
Bindings      : {Global::Ctrl+R, Ctrl+A}
LocalizedName : TestExplorer.DebugAllTests

Name          : TestExplorer.RunAllTestsInContext
Collection    : System.__ComObject
DTE           : System.__ComObject
Guid          : {1E198C22-5980-4E7E-92F3-F73168D1FB63}
ID            : 885
IsAvailable   : True
Bindings      : {Global::Ctrl+R, T}
LocalizedName : TestExplorer.RunAllTestsInContext

Name          : TestExplorer.DebugAllTestsInContext
Collection    : System.__ComObject
DTE           : System.__ComObject
Guid          : {1E198C22-5980-4E7E-92F3-F73168D1FB63}
ID            : 896
IsAvailable   : True
Bindings      : {Global::Ctrl+R, Ctrl+T}
LocalizedName : TestExplorer.DebugAllTestsInContext

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants