Closed yaronyam closed 4 months ago
I fixed the 1st issue,but for the second [consider target language] i have no good idea how to fix it。I will try to support this feature as an intention and add some integration tests some times later。
I added a intention action on method.
Issues fixed by https://github.com/wrdv/testme-idea/pull/39 - many thanks @huangliang992 ❤️
Found some issues with test generation for single method
1st issue A. try to generate UT for method (cursor on method) that already has a UT that is not named as
<className>Test
- error alert pops with NPE - PSB stack trace. empty test class generated B. try to generate UT for method (cursor on method) that already has an empty UT class (without any methods or imports) getting error alert2nd issue added test method doesn't consider target language. to reproduce: generate UT in lang A(i.e. Java) , place cursor on test method, select a template for lang B( i.e Groovy). test method in lang B added to UT in lang A.
also found this error in logs. didn't notice if it was raised right after test scenario described above
Bumped into other issues as well...but could not reproduce after clearing some UT's on simple setting. More testing required on more use cases. also think it would be very useful to add integration testing. As mentioned previously, UX feels awkward when behavior is different if cursor is on/off a test method name and if UT exists or not. think it would be good to support this feature as an Intention
FYI @huangliang992 Thanks