forcedotcom / ApexUnit

ApexUnit is a powerful continuous integration tool for the Force.com platform
BSD 3-Clause "New" or "Revised" License
71 stars 51 forks source link

Implement true "regex" support. #21

Open tfuda opened 8 years ago

tfuda commented 8 years ago

Currently the two options -regex.for.selecting.source.classes.for.code.coverage.computation and -regex.for.selecting.test.classes.to.execute can be used to specify a comma separated list of patterns for selecting classes. The patterns support simple wildcard substitution and are converted into SOQL LIKE clauses. For example the pattern Test would be converted into WHERE Name LIKE '%Test%'. This is technically not true regex pattern matching. In order to support true regex pattern matching, I think you would have to query all Apex classes in the specified namespace and then iterate through the result set, and then use the Java Pattern and/or Matcher classes to see if the class names match the specified regex.

pmedapuram commented 8 years ago

Here (refer to the comment at the bottom) is the reference to the use case provided by @tfuda . Thank you @tfuda

adarsh-ramakrishna-sfdc commented 8 years ago

Implementing the 'true' regex support would require finding a way to honor the regex patterns in the soql queries along with using the matching logic as mentioned by @tfuda . This will take more time to implement and unfortunately we don't have the bandwidth for this. However we would welcome the community to help and contribute to this enhancement request.

aabrego commented 7 years ago

I see some scenarios where the true REGEX support can become very useful. I will start working on this one step at a time ...

vamshi-sfdc commented 6 years ago

@aabrego have you had a chance to look into this? Please let us know

KThompso commented 6 years ago

Has there been any movement on this issue? I have a use for this feature and would be willing to provide support if it's being worked on -- or implement it if it's not.

aabrego commented 6 years ago

No progress on this one and no plans on working on it for now due to other prorities. Volunteers are welcome.Thanks!

On Mon, Oct 22, 2018, 8:36 PM KThompso notifications@github.com wrote:

Has there been any movement on this issue? I have a use for this feature and would be willing to provide support if it's being worked on -- or implement it if it's not.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/forcedotcom/ApexUnit/issues/21#issuecomment-432078033, or mute the thread https://github.com/notifications/unsubscribe-auth/AAiaSH0RRsBWW7nuuiiWB9FgM2-AiChCks5uno60gaJpZM4HI40r .