-
Notifications
You must be signed in to change notification settings - Fork 1
User guide: Setting up your workspace and getting started
This guide is written to help you get started using the TMC plugin for Qt Creator.
- User has Java Runtime installed
- User has the executable
tmc-langs-cli
.jar
file located on their hard drive - User has the Qt Creator IDE installed.
We will be using the tmc-langs-cli
.jar
file for testing projects locally before they are submitted to be tested at the TMC server.
Please visit the maven testmycode directory for tmc-langs-cli
.
From the newest SNAPSHOT directory, download the tmc-langs-cli
.jar
file that does not have "sources" in it's file name.
You should be looking for for something such as /0.7.7-SNAPSHOT/tmc-langs-cli-0.7.7-20171213.095142-15.jar
.
Store the file in a convenient place, as we will be using it later when setting up the plugin.
You can download and install Qt Creator either from qt.io or install the package using the package manager of your distribution.
You can download and install Qt Creator from qt.io.
All the functionality related to the TMC plugin for Qt Creator can be found in the dropdown menu named TestMyCode
.
If you are running the plugin for the first time, you will need to enter the address to the TMC server and logging in using your TMC username and password using the login menu. All other TestMyCode menu options will remain unavailable until you do so.
Once you have logged in, you will be able to enter the settings menu to set up your workspace.
To set up your workspace, please select your organization and the course you are participating in.
Next, choose your project folder (this is where your exercises will be downloaded) and locate the tmc-langs cli
.jar
file on your hard drive.
If you wish to tweak the exercise update interval, feel free to do so.
After setting up your workspace, you are now ready to download the exercises your course has available.
Once you have downloaded and configured the exercises, you are ready to start coding!
You may test your code locally at any time using the Test project option.
If your code passes the required local tests, you will be prompted to submit your code to be tested serverside.
If you wish to refactor your code before submitting, you can simply press "Cancel" and submit your code manually or trough local testing at a later time.
This is what you should see the first time you start up Qt Creator with the TMC plugin.
Before logging in, further options in the menu will be grayed out and the settings menu will be unavailable.
Logging on to the TMC server is the first and only thing you are able to do at this point.
You will stay logged on until you choose to log out from the settings menu.
Your username will be stored locally, however there is no reason to log out inbetween coding sessions.
The Organization dropdown menu will contain a list of available organizations. You should choose the one that is offering the course that you are taking.
The Current Course dropdown menu will contain a list of available courses. You should choose the one that you have enrolled in.
The Project folder option is where the directory with your downloaded exercises will be located.
The TMC.jar location is where you stored your TMC-langs-cli.jar
.
The TMC plugin will check for new or updated exercises in the background.
The Update interval option will allow you to tweak the interval to your liking.
Tick the exercises you wish to download.
This is where you can monitor the exercise download progress. The window will close on it's own when the downloads have finished.
Once the project downloads have finished, the plugin will automatically open all the downloaded exercise projects. You are required to configure your downloaded projects.
The last exercise in the list will open in the Configure project view, the rest you will need to configure manually.
As you can see, the project for Exercise 2 is unconfigured after loading.
You may click the link in the Mode manager to configure the project.
Alternatively you can configure your unconfigured projects by clicking the Projects button in the menu above the Mode manager.
You are able to choose your active project using the Mode manager as shown.
Testing will be done to the project that is active at time.
Shown below is Exercise 1 as the active project.
We have successfully tested our project locally, which may now be submitted to be tested on the TMC server.
The TMC Results pane shows you the results of your local testing, passed/failed tests and points attached for the exercise.
Please note that the local tests only show the points expected.
Points will not be awarded until tests run and pass server side.