Please follow the steps below:
- Install git by following the instructions in this link.
- Set up your mail and name in git. Please refer here on how to do it.
- Fork the TestNG repository [ This is done ONLY once ]. Here’s a good article that will teach you what you need to know about forking a repository in Github.
- Clone your forked repository [ This is ALSO done ONLY once ]. Here’s how to do it.
- Now from within your clone, create a new branch to represent your changes. Here’s how to do it.
- If it's a new feature please make sure you have a discussion on it with the TestNG team first before you start work or you may end up spending time unnecessarily. Once you have a buy in, make sure you create a new issue in the TestNG repository.
- Now add your code, add javadocs, don't forget unit tests for your delivery and then also update the CHANGES.txt. Unit tests reference should be added to src/test/resources/testng.xml
- Include a good commit message. Here’s how to do it.
- Make sure you refer to the issue that you created on github in your commit message. This will ensure that the reviewers of your delivery will be able to tie down your delivery to the issue that it's fixing. Here’s how to do it.
- Now from your clone run the command :
git push origin my-new-feature
[ here my-new-feature is the name of the new branch being created for our new testng delivery/bugfix etc., Please replace it with your branch name ] - Send a pull request which is the last step of your delivery. Here’s how to do it.
Remember : From your second delivery onwards, you just need to start following steps (5) to (11).
To run the build, from the command prompt you just need to invoke ./build-with-gradle
.
If you are on windows, then you can perhaps just invoke gradlew --daemon --stacktrace clean build test