fsprojects-archive / zzarchive-VisualFSharpPowerTools

[ARCHIVED] Power commands for F# in Visual Studio
http://fsprojects.github.io/VisualFSharpPowerTools/
Apache License 2.0
310 stars 77 forks source link

GoToDefinitionTests and maintenance pain #1444

Closed smoothdeveloper closed 7 years ago

smoothdeveloper commented 7 years ago

I'm adding a small change to the signature file generator.

That change gets 50 tests to fail (which is fine) although as it is there is no clear way for me to easily fix the expected results in each failing tests.

Moreover, over the 57 tests in this class, the test implementation is basically repeated over and over, with input file and expectation being inline as raw strings in the code.

I don't think this structure is maintainable / scalable to encourage adding more tests or enhancing the feature (generally involves breaking all those tests with need to adjust expected output), so I would propose the following:

cloudRoutine commented 7 years ago

I agree that the current test setup isn't ideal, but it'd be nice to see a proof of concept for what you're proposing. It'd only need to cover 2 or 3 test cases, but should show how all the different parts you're describing would work.

dungpa commented 7 years ago

I support the ideas.

To fix Travis unit tests, I had to go through all failing tests and fix them manually. The current process is extremely painful.

smoothdeveloper commented 7 years ago

Could someone run the test I've submitted in my PR (#1452) / branch: https://github.com/smoothdeveloper/VisualFSharpPowerTools/tree/gotodef-test-refactor to confirm it runs locally?

I need to figure out why they fail on appveyor/travis but want to confirm it runs locally and might be relative to wrong version of FSharp.Core used for signature generation in the tests.

smoothdeveloper commented 7 years ago

1452 is ready for review