You can set up the environment either using Git Bash or using SourceTree. SourceTree GUI helps you to simplify your interaction with the GIT repositories. In order to use SourceTree, you must first install it on your system.
Setting up an environment is a one-time activity. After the setup is completed, all the changes made to the test cases and tasks are automatically managed in the Bitbucket repository.
Install SourceTree and Configure Credentials
In order to start working with your Bitbucket repositories, you must first install and configure sourceTree.
- Download and install SourceTree.
- Post installation, launch SourceTree.
- From the Tools menu, select Options.
- In Authentication, click Add.
- Set Hosting Service as Bitbucket.
- Set Prefered Protocol as HTTPS.
- Authentication as Basic.
- In Username, enter your Bitbucket account username.
- Click Refresh Password to authenticate username.
An Authentication window appears. - Enter your Bitbucket password.
- Select the Remember Password option and then click Login.
SourceTree is now configured for working with the Bitbucket repositories.
Creating and Cloning Repository
After you configure SourceTree, you can now create a repository and clone it on the local system.
To create and clone repository:
- Launch SourceTree.
- Click Create.
- In the Destination Path, select a folder path where you would like to save and work on your local repository.
- Enter the prefered repository name.
- Select GIT.
- Select the Create Repository on Account option.
In the Repository Settings, Bitbucket account details appear that are added while configuring SourceTree. - Add description, if required.
- Select Is Private option to mark this repository as a private repository.
- After the repository is created and cloned, add a sample text file into the repository and commit it.
- To commit sample file,
- Navigate into the folder where you have cloned the repository on the local system.
- Create a new sample.txt file with sample text in it.
- From SourceTree, stage the file and add comment, if required.
- Select Push changes immediately option and click Commit.
Adding Existing Qualitia Projects to Bitbucket Repository
After you clone the repository, you can now add your existing Qualitia projects to the Bitbucket repository.
This is a one-time activity for each of the existing Qualitia project. Once the project is added to the repository, all the changes made to the repository are automatically updated by Qualitia.
To add existing projects to Bitbucket repository:
- Navigate to the folder where you have cloned the repository.
- Move your existing project folder (<ProjectName>_projectdb) to this location.
You can get the location in Qualitia Configuration Setting > Dependency > Project Path. - Launch SourceTree.
- Create a new branch with your Qualitia Project name.
To create a new branch:- Click Branch > New Branch.
- Enter New Branch name.
- Ensure that Checkout New Branch option is selected.
- Click Create Branch.
- Stage all files and add comments, if required.
- Select Push changes immediately option and click Commit.
- Now copy the directory path of the repository from local system and set it as Qualitia Project Path (in Configuration Setting > Dependency).
- Restart Qualitia to start working on the projects that are integrated with Bitbucket repository.