Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orchestration module: Migration of the Resource Identification process code and tests #59

Merged
merged 28 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
dc83cd1
First commit: migrating the resource identifier with the entities + t…
augustocristian Nov 13, 2024
6537a3d
Some changes done:
augustocristian Nov 15, 2024
578bbb6
Solved some problems in the workflow file
augustocristian Nov 15, 2024
f75856d
Adding dependencies between build-test
augustocristian Nov 15, 2024
2682c0d
Use the Maven reactor to build and resolve dependencies across modules
augustocristian Nov 15, 2024
0e9be52
Use the Maven reactor to build and resolve dependencies across modules
augustocristian Nov 15, 2024
7d99819
Adding Jacoco to generate the coverage reports
augustocristian Nov 15, 2024
92474df
Moving dependencies to the parent pom and finishing to declare versio…
augustocristian Nov 15, 2024
18f34a2
Changes requested 2
augustocristian Nov 15, 2024
f7fffdb
Some mistake in the pipeline code
augustocristian Nov 15, 2024
9a08652
Some mistake in the pipeline code
augustocristian Nov 15, 2024
10929cd
Changes to be commited:
augustocristian Nov 15, 2024
d2789f1
Last change:
augustocristian Nov 15, 2024
0363ad9
Last change:
augustocristian Nov 15, 2024
3b63521
Last change:
augustocristian Nov 15, 2024
50e0a75
Last change:
augustocristian Nov 15, 2024
83221cd
Last change:
augustocristian Nov 15, 2024
4d8aa72
Changes required by Javier:
augustocristian Dec 3, 2024
9ce55ed
First version of the README with inputs-ouputs detailed
augustocristian Dec 4, 2024
072c2ab
Fixing english typos
augustocristian Dec 4, 2024
03950cd
Adding the Quick start steps and the new article to the citations
augustocristian Dec 4, 2024
1b66ace
Some minor typos
augustocristian Dec 4, 2024
6f08a74
Adding foot note
augustocristian Dec 4, 2024
35c17cb
Ready for review
augustocristian Dec 4, 2024
c994ac1
Changes:
augustocristian Dec 5, 2024
7435dc1
Detailed the parameters of the generateJenkinsfile() method.
augustocristian Dec 5, 2024
d2edc8a
Adding the single module requirement in the inputs and the Prepare se…
augustocristian Dec 5, 2024
d49bffc
Removing the diff of the compose
augustocristian Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
augustocristian marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Additional components will be added in future releases.
- [RETORCH: Resource-aware End-to-End Test Orchestration:]()
- [Quick Start](#quick-start)
- [RETORCH Annotations](#retorch-annotations)
- [RETORCH Orchestration](#retorch-orchestration)
- [Contributing](#contributing)
- [Contact](#contact)
- [Citing this work](#citing-this-work)
Expand Down Expand Up @@ -71,6 +72,10 @@ void forumLoadEntriesTest(String usermail,String password,String role){
this.slowLogin(user,usermail,password);
}
```
## RETORCH Orchestration
The RETORCH framework provides a tool that generates an Execution Plan, along with the required pipelining and script
files for execution in a CI environment. The generation of scripts and pipelining code is based on the Access Modes
annotated within the test cases and the Resource information specified in `/retorchfiles/[SUT_NAME]SystemResources.json`.
augustocristian marked this conversation as resolved.
Show resolved Hide resolved

## Contributing

Expand All @@ -91,7 +96,6 @@ RETORCH E2E Test Orchestration framework:
*Software Quality Journal*, vol. 28, no. 3, 2020.
https://doi.org/10.1007/s11219-020-09505-2 - [Full Article available](https://link.springer.com/article/10.1007/s11219-020-09505-2) - [Authors version](https://digibuo.uniovi.es/dspace/bitstream/handle/10651/55405/RETORCHSQJExtension_BUO.pdf;jsessionid=0E661594C8732B8D2CA53636A31E4FD5?sequence=1) -
[Download citation](https://citation-needed.springer.com/v2/references/10.1007/s11219-020-09505-2?format=refman&flavour=citation)

## Acknowledgments

This work has been developed under the TestBUS (PID2019-105455GB-C32) project supported
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import org.slf4j.LoggerFactory;

/**
* This exception is thrown when the classifier receives an input that is empty or its invalid i.e: null, no exist
* directories...
* The {@code EmptyInputException} is thrown when the {@code RetorchClassifier} receives an input that is empty
* or its invalid i.e: null, no exist directories...
*/
public class EmptyInputException extends Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
import java.nio.file.Paths;
import java.util.*;

/**
* The {@code ResourceSerializer} class provides utilities for managing Resource configurations
* in the RETORCH orchestration Tool. Supports the serialization of Resources into JSON files and
* its deserialization back into Java objects, enabling the retrieval of Resources attributes from Resources
* JSON configuration files.
*/
public class ResourceSerializer {
augustocristian marked this conversation as resolved.
Show resolved Hide resolved

private final Logger logSerializer = LoggerFactory.getLogger(ResourceSerializer.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
import java.util.*;
import java.util.stream.Collectors;

/**
* The {@code RetorchClassifier} class provides utilities for performing the Resource Identification phase. Provides
* methods to retrieve the test cases from a package, reads the {@code AccessMode}, deserializes the Resource file, and
* starts creating the different {@code Resources} and {@code TestCases} that compose the {@code System}
*/
public class RetorchClassifier {

private static final Logger log = LoggerFactory.getLogger(RetorchClassifier.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package giis.retorch.orchestration.model;

/**
* The {@code AccessMode} class represents the Access Mode performed by a {@code TestCase} on a {@code Resource}.
* It defines the type of access, the max number of concurrent test cases that can access the {@code Resource},
* and whether the {@code Resource} can be shared.
*/
public class AccessMode {
augustocristian marked this conversation as resolved.
Show resolved Hide resolved

private AccessModeTypes type;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package giis.retorch.orchestration.model;

/**
* This class is used as AccessMode parser for given a string representation of a RETORCH access mode (i.e:
* READONLY,READWRITE...) convert it into the proper enumeration. Also provides
* The {@code AccessModeTypes} class is used as AccessMode parser for given a string representation of a RETORCH access mode (i.e:
* READONLY,READWRITE...) convert it into the proper enumeration.
*/
public class AccessModeTypes {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The {@code ElasticityModel} class represents the Elasticity Model of one {@code Resource}. It defines the Elasticity
* Model attributes: the id, the upper bound of {@code Resource} that we can instantiate and its individual cost.
*/
public class ElasticityModel {

private String elasticityID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
import java.util.LinkedList;
import java.util.List;

/**
* The {@code Resource} class represents a Resource required by one or more {@code TestCases}. Provides the different
* Resource attributes: identifier, hierarchy Parent, {@code Resource} that can replace it, the minimal {@code Capacity}
* required,the {@code ElasticityModel}, the type and its docker image.
*/
public class Resource {

public enum type {PHYSICAL, LOGICAL, COMPUTATIONAL}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.List;

/**
* The {@code ResourceInstance} class represents a resource with a name and a list of {@code Capacity} that requires
* The {@code ResourceInstance} class represents a Resource with a name and a list of {@code Capacity} that requires
* for its instantiation.This class is used during the profile generation to calculate the overall {@code Capacity} that
* are used-required.
* It provides methods to get and set the name and capacities, and overrides the {@code equals}, {@code hashCode},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
import java.util.LinkedList;
import java.util.List;

/**
* The {@code System} class represents the whole RETORCH System composed by the Lists of {@code Resources} and {@code TestCase}
*/
public class System {

private static final Logger logSystemClass = LoggerFactory.getLogger(System.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import java.util.stream.Collectors;

/**
* The {@code TJobClass} class represents a TJob with a name, stage, and a set of {@code ResourceClass}.
* The {@code TJob} class represents a TJob with a name, stage, and a set of {@code Resource}.
* When the TJob is created, it calculates the total amount of {@code Capacity} that is used by the list of
* {@code ResourceClass} required
* {@code Resource} required
*/
public class TJob {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import java.util.LinkedList;
import java.util.List;

/**
* The {@code TestCase} class represents a test case that compose the End-to-End test suite. It has a name, its class
* and the list of {@code AccessMode} performed over the different {@code Resource}
*/
public class TestCase {

private final String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.*;

/**
* {@code ClassifierTests} class provides the unitary tests of the different {@code RetorchClassifier} methods
* */
public class ClassifierTests {

private static final String SYSTEM_NAME = "ClassifierUnitTests";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
import java.util.List;
import java.util.stream.Collectors;

/**
* {@code ClassifierUtils} class extends {@code GenericUtils} providing a series of utils that generates
* a {@code System} with its Lists of {@code TestCase} and {@code Resource} for being used
* in the {@code ClassifierTests} class
*/
public class ClassifierUtils extends GenericUtils {

public List<TestCase> getAllTestCases() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

import java.util.LinkedList;
import java.util.List;

/**
* {@code GenericUtils} class provides a series of methods that creates different types of Resources for
* being used during the integration and unitary testing.
*/
public class GenericUtils {

protected static final String READONLY = "READONLY";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

import static org.junit.Assert.*;

/**
* {@code TJobsEntityTests} class provides the unitary tests of the different {@code TJob} methods
*/
public class TJobsEntityTests {

private final Logger log = LoggerFactory.getLogger(this.getClass());
Expand Down
Loading