samedi 13 février 2021

writing load tests for junit springboot application

I have written the following junit test.

@SpringBootTest
public class abc {

@Autowired
private ActorService actorService;

@Test
@Transactional
public void testCorrectIdHandlingForNewInsertedActors() {
    int elementsInDb = 0;
    for (Actor a : this.actorService.findAll()) {
        elementsInDb++;
    }

    Actor actor = this.actorService.saveAndSetId(new Actor());

    assertEquals(elementsInDb + 1, actor.getId());
}
}

Now I want to write some load tests for performance testing but I don't know which tools I can use within my spring application. I am using gradle as my build tool. Any tutorial will be appreciated.

PS: I have already tried zerocode but does not work for me

Aucun commentaire:

Enregistrer un commentaire