tSQLt-org / tSQLt

The official tSQLt repository. (Download at: http://tSQLt.org/downloads )
http://tSQLt.org
416 stars 104 forks source link

Test Anotations over encrytped Tests #160

Open fjsosa opened 2 years ago

fjsosa commented 2 years ago

Hi, we had some tests marked with --@tSQLt:SkipTest, now this tests are encrypted (with: WITH ENCRYPTION AS) now it seems that tsqlt is ignoring the annotations, is this an expected behavior? thank so much.

I was checking the CLR code involved and it seems that the only way to detect annotations like --@tSQLt:SkipTest is by analizing the source code of each SP. It seems that is not possible to work with annotations and encrypted test. Could you please confirm this?

If this is the case, could we, in the future, optionally use Extended Properties to add this kind of annotations?

mbt1 commented 2 years ago

@fjsosa, I've been thinking about how to address this. There are a few options that could be implemented. But, could you help me understand your use case for encrypted test case stored procedures? To me, a unit test also serves as documentation, so encrypting it seems counterintuitive.

fjsosa commented 2 years ago

Hi, thanks for you answer, for us, some tests goes to the customer db, we use that to monitor / check the product health, but, some of those test can reveal some parts of our code we would like to keep hidden for the customers. We have plans to implement the tSQLt annotations as ExtendedProperties.

mbt1 commented 2 years ago

@fiosa, have you had any luck with implementing Extended Properties?