Jmix UI Integration Testing: Sneferu 1.0 released

Hi everyone,

I have ported over the Sneferu library from CUBA platform to Jmix.

You can find it here:

If you want to learn about the changes for the migration from CUBA platform, see: Sneferu: Migration from CUBA platform



Sneferu is a testing library to simplify integration testing for a Jmix application. It contains APIs that allows you to express interactions and verifications with UI screens via a high-level testing language.


Instead of spending too much time and money maintaining a selenium test suite, Sneferu is the way to have very good test coverage and quality assurance at a fraction of the cost.

Via its easy-to-read language you can create integration tests that are optimized for readability, because this is what matters most for keeping a test suite maintainable & cheap to operate.

Sneferu enables you to:

  • verify any business logic in a Screen Controller
  • ensure the correct linking between a Screen XML and its Controller counterpart
  • verify correct display of any programmatic creation of Screen Components / Dialogs
  • verify the data loading from the database through declarative data loading

What Sneferu does not cover:

  • perform client-side JS-based Vaadin UI logic that is executed only in the browser (like showing the date picker popup where it is possible to select a particular date)
  • verify rendering issues in the browser



        authenticatedUser = "admin",
        mainScreenId = "petclinic_MainScreen",
        screenBasePackages = "io.jmix.petclinic"
public class CreateVisitTest {
    void aVisitCanBeCreated_whenAllFieldsAreFilled(UiTestAPI uiTestAPI) {

        // given:
        final Pet pikachu = dataManager.create(Pet.class);
        final Pet savedPikachu =;

        // and:
        final StandardLookupTestAPI<Visit, VisitBrowse> visitBrowse = uiTestAPI.openStandardLookup(Visit.class, VisitBrowse.class);

        // when:
        final StandardEditorTestAPI<Visit, VisitEdit> visitEdit = uiTestAPI.getOpenedEditorScreen(VisitEdit.class);

        OperationResult outcome = (OperationResult) visitEdit
                .interact(enter(textField("descriptionField"), "Regular Visit"))
                .interact(select(comboBox("typeField"), VisitType.REGULAR_CHECKUP))
                .interact(select(entityComboBox("petField"), savedPikachu))

        // then:

        // and:


Lol, I totally forgot that it only works with Jmix 1.2 :slight_smile:

So either you already switch to 1.2-SNAPSHOT, or you have to wait for Jmix 1.2 to be released :slight_smile: this will probably happen over the next weeks…



Hi everyone,

with the release of Jmix 1.2.0 I also updated Sneferu to version 1.1.0, which is compatible with this Version of Jmix.

Happy testing!

1 Like