Using org.assertj.core.api.BDDAssertions.then causes "Add at least one assertion to this test case." issues


Hello @Mike_Gresens,

Thanks for raising this problem. We did a huge effort recently to make the rule squid:S2699 raising less FPs. Still it looks we missed BDDAssertions. The good news is that you can now configure the rule S2699 to take into account extra frameworks. Here is how to achieve that:

  1. Create a custom Quality Profile by extending “Sonar Way” for Java. This can be done in your organization, here: - there is a button “Create” on the top right on this page when you are owner of the organization.
  2. Override the configuration of S2699 in your custom Quality Profile like this:


  1. Associate your new Quality Profile to your project.
  2. Scan your project once again.

I did this configuration of the QP on my organization: so that you have an example.


Thank you! Works fine.

Hello @Mike_Gresens,

Latest version of the Java analyzer was deployed on SonarCloud.
It should work better out of the box without the workaround now.