-
Notifications
You must be signed in to change notification settings - Fork 3
Eclipse Theia Service Creation
An Eclipse Theia extension for handling the creation or extension of a service. The repository of the Theia extension is included in eclipse-researchlabs in the Service Creation Theia extension. For the backend we have two different repositories created using the Spring framework (Service Creation and Service Creation Testing)
Structure Creation (Service Creation)
The service includes two endpoints:
Endpoint 1: "/createStructure" -> creates a GitLab repository. Request parameters: **projectName **-> String **projVisibility **-> String **projDescription **-> String **gitLabServerURL **-> String **gitlabToken **-> String
Endpoint 2: "/createStuctureJenkins" -> creates a GitLab repository and a Jenkins pipeline and finally configures and pairs them. Request parameters: **projectName **-> String **projVisibility **-> String **projDescription **-> String **gitLabServerURL **-> String **gitlabToken **-> String **jenkinsServerUrl **-> String **jenkinsUsername **-> String **jenkinsToken **-> String
While creating a new Service from scratch, it is necessary to have the required structure that accommodates the development process. The structure mandates the existence of a repository (for e.g. GitLab) paired with a CI/CD pipeline (GitLab or Jenkins). In order to hide the complexity of configuring and executing the aforementioned tools, the backend component handles them automatically through its API invocation.
This backend service leverages the provided GitLab and Jenkins APIs in order to authenticate a User and create a new repository based on the options selected by the User. Furthermore, depending on the User’s choices, the newly created repository can be paired with a Jenkins CI/CD. The component creates a new Jenkins CI/CD pipeline and then performs the necessary configuration actions (webhooks, ect.) in order to complete the pairing process. As a result, the process is completed automatically, thus sparing the User from the manual use and configuration of the external tools.
Test Generation (Service Creation Testing)
The service includes one endpoint:
Endpoint 1: "/generateTests" -> automatic generation of Unit tests. Request parameters: **gitRepoURL **-> String **gitUsername **-> String **gitToken **-> String
After having developed the code of a new service, we have the final working product. The SmartCLIDE platform aims at facilitating code and service reuse, as well as providing aid to the developer during the service development process. One functionality that ties into both of the aforementioned goals is the automatic creation of unit tests for newly created services. This backend service uses the existing tool Randoop for the automatic generation of Regression and Error tests. The service is invoked through an API. After the invocation, the service authenticates the Git User and then clones the given repository. In order to proceed to the next steps, the repository must contain a Maven project. The next step is the building of the project by executing a maven package command. Afterwards, if the build command is executed successfully, the class files of the project are extracted which are then used for the test generation process. Finally, after a successful Randoop execution, the generated unit tests are pushed to the repository inside a folder named “smartCLIDE_tests” with the commit message “SmartCLIDE - autogenerated tests”.