How to automate testing?

Asked

Viewed 171 times

5

It is common each time deploy a bug occurs to go along, often noticed only months after that change. To solve this, I want to know if it’s possible to test ALL main functionalities in an automated way? I mean, before going into production, integration test will execute and if it fails will not rise.
In addition, there is another option but to create multiple Junit tests?

  • As it stands, this question is very broad. There are several types of testing (unit, regression, integration...), some more automated and others less. How to insert them into your workflow, how to use your development tools/deploy to assist in this, etc., are also varied. Please specify the question further, if you want to know "how to automate Junit unit testing on platform X" or "what is the Y test for and when to use it", this is already more "responsive".

  • In addition to @mgibsonbr said, look for Continuous Integration. No doubt it will help you, although it’s not directly related.

  • Sounds to me like Jenkins would be the answer you want. It is possible with it to build a build process that after the build, it will run the tests and automatically put into production if all of them pass (and stop doing this if they fail). However, since I don’t know much about Jenkins and it’s been a while.

  • It is possible to test without using Junit. A program within a public static void main(String[]) An alternative to Junit is Testng. However, Testng is an alternative. There are plug-ins for Junit and Testng to cover deficiencies of both. And in the end, automatic tests (yet) do not fall from the sky, because at some point you should write them.

1 answer

1


A widely used software is Jenkis that through it, it is possible to expedite time-consuming tasks such as the compilation of a project and the execution of its automated tests. With a well-configured continuous integration server, these tasks are executed with each change in the code repository, and in the event of build errors or failures in automated testing, all developers are alerted quickly. This way, if the integration server does not point out problems in the project, the team is sure that the changes in the code are in accordance with the battery of tests. It is also a step towards continuous deploy.

Many people who are adept at Open Source, since this has support and is provided by the community directly. Integrates with Git, SVN, CVS, and builds repositories with Maven, Ant, Gradle etc. Runs on a Servlet Container, which makes it easier in case you already have an application server running on a test server, for example. But if you don’t have it, fine: it has an "executable" version, which is not standalone, but which does the service of deploying itself to you. Once you’ve set up the versioning repository for your project, you’re done: just run the builds by Dashboard, which gives you the brief build information and console access. Runs unit tests as in your case Junit, including integrated with Selenium and other acceptance testing tools. Error? Send email and even SMS.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.