diff --git a/.gitignore b/.gitignore index 5299030a..533fef9d 100644 --- a/.gitignore +++ b/.gitignore @@ -39,8 +39,9 @@ stateful_data.json /src/main/resources/Examples/Ex1_RandomGeneration/test_cases/ /src/main/resources/Examples/Ex2_CreateTestConf/default_test_conf.yaml /src/main/resources/Examples/Ex3_CBTGeneration/test_cases/ -/src/main/resources/Examples/Ex4_CBTGenerationAuth/test_cases/ -/src/main/resources/Examples/Ex5_RandomGeneration_DataMutation/test_cases/ -/src/main/resources/Examples/Ex8_Generation_Execution/allure_report/anApiOfIceAndFire/ -/src/main/resources/Examples/Ex8_Generation_Execution/csv_report/anApiOfIceAndFire/ -/src/main/resources/Examples/Ex9_Iterative_Generation_Execution/allure_report/anApiOfIceAndFire/ +/src/main/resources/Examples/Ex4_ARTestGeneration/test_cases/ +/src/main/resources/Examples/Ex5_CBTGenerationAuth/test_cases/ +/src/main/resources/Examples/Ex6_RandomGeneration_DataMutation/test_cases/ +/src/main/resources/Examples/Ex9_Generation_Execution/allure_report/anApiOfIceAndFire/ +/src/main/resources/Examples/Ex9_Generation_Execution/csv_report/anApiOfIceAndFire/ +/src/main/resources/Examples/Ex10_Iterative_Generation_Execution/allure_report/anApiOfIceAndFire/ diff --git a/README.md b/README.md index 5257681d..095f2dff 100644 --- a/README.md +++ b/README.md @@ -128,22 +128,31 @@ In this example, we will explore the generation and execution of test cases usin ```java -public class Ex8_Generation_Execution { +public class Ex9_Generation_Execution { - public static String propertyFilePath="src/main/resources/Examples/Ex8_Generation_Execution/user_config.properties"; // Path to user properties file with configuration options + public static final String PROPERTY_FILE_PATH = "src/main/resources/Examples/Ex9_Generation_Execution/user_config.properties"; // Path to user properties file with configuration options - public static void main(String[] args) throws RESTestException { - // Load properties - RESTestRunner runner = new RESTestRunner(propertyFilePath); + public static final Logger logger = Logger.getLogger(Ex9_Generation_Execution.class.getName()); - // Run workflow - runner.run(); + public static void main(String[] args) throws RESTestException { + // Load properties + RESTestRunner runner = new RESTestRunner(PROPERTY_FILE_PATH); - System.out.println(runner.getNumberOfTestCases() + " test cases generated and written to " + runner.getTargetDirJava()); - System.out.println("Allure report available at " + runner.getAllureReportsPath()); - System.out.println("CSV stats available at " + PropertyManager.readProperty("data.tests.dir") + "/" + runner.getExperimentName()); - System.out.println("Coverage report available at " + PropertyManager.readProperty("data.coverage.dir") + "/" + runner.getExperimentName()); - } + // Run workflow + runner.run(); + + if (logger.isLoggable(java.util.logging.Level.INFO)) { + String message1 = String.format("%d test cases generated and written to %s", runner.getNumberOfTestCases(), runner.getTargetDirJava()); + String message2 = String.format("Allure report available at %s", runner.getAllureReportsPath()); + String message3 = String.format("CSV stats available at %s/%s", PropertyManager.readProperty("data.tests.dir"), runner.getExperimentName()); + String message4 = String.format("Coverage report available at %s/%s", PropertyManager.readProperty("data.coverage.dir"), runner.getExperimentName()); + logger.info(message1); + logger.info(message2); + logger.info(message3); + logger.info(message4); + } + + } } @@ -160,7 +169,7 @@ Finally, test failures are collected and they can be easily spotted and analyzed En this section, we will delve into a specific example to illustrate in detail how RESTEST operates. Throughout the following steps, we will break down a practical scenario, providing step-by-step explanations of how the system functions. -In this example, we will conduct tests on the Ice and Fire API using RESTest. To perform these tests, we will rely on the OpenAPI specification of the API, which is available at the following [link](src/main/resources/Examples/Ex9_Iterative_Generation_Execution/spec_iceandfire.yaml). +In this example, we will conduct tests on the Ice and Fire API using RESTest. To perform these tests, we will rely on the OpenAPI specification of the API, which is available at the following [link](src/main/resources/Examples/Ex10_Iterative_Generation_Execution/spec_iceandfire.yaml). En the next step, we will proceed to obtain the configuration file that will encompass all the essential settings for our tests. This file plays a fundamental role as it sets key parameters, such as the types of generators to use, specific configurations for the Ice and Fire API, and any other relevant information for the successful execution of tests with RESTest. This is the configuration file for this example: @@ -351,22 +360,31 @@ Once we have this file, we will be ready to carry out the generation and executi ```java -public class Ex8_Generation_Execution { +public class Ex9_Generation_Execution { - public static String propertyFilePath="src/main/resources/Examples/Ex8_Generation_Execution/user_config.properties"; // Path to user properties file with configuration options + public static final String PROPERTY_FILE_PATH = "src/main/resources/Examples/Ex9_Generation_Execution/user_config.properties"; // Path to user properties file with configuration options - public static void main(String[] args) throws RESTestException { - // Load properties - RESTestRunner runner = new RESTestRunner(propertyFilePath); + public static final Logger logger = Logger.getLogger(Ex9_Generation_Execution.class.getName()); - // Run workflow - runner.run(); + public static void main(String[] args) throws RESTestException { + // Load properties + RESTestRunner runner = new RESTestRunner(PROPERTY_FILE_PATH); - System.out.println(runner.getNumberOfTestCases() + " test cases generated and written to " + runner.getTargetDirJava()); - System.out.println("Allure report available at " + runner.getAllureReportsPath()); - System.out.println("CSV stats available at " + PropertyManager.readProperty("data.tests.dir") + "/" + runner.getExperimentName()); - System.out.println("Coverage report available at " + PropertyManager.readProperty("data.coverage.dir") + "/" + runner.getExperimentName()); - } + // Run workflow + runner.run(); + + if (logger.isLoggable(java.util.logging.Level.INFO)) { + String message1 = String.format("%d test cases generated and written to %s", runner.getNumberOfTestCases(), runner.getTargetDirJava()); + String message2 = String.format("Allure report available at %s", runner.getAllureReportsPath()); + String message3 = String.format("CSV stats available at %s/%s", PropertyManager.readProperty("data.tests.dir"), runner.getExperimentName()); + String message4 = String.format("Coverage report available at %s/%s", PropertyManager.readProperty("data.coverage.dir"), runner.getExperimentName()); + logger.info(message1); + logger.info(message2); + logger.info(message3); + logger.info(message4); + } + + } } ``` diff --git a/src/main/java/es/us/isa/restest/examples/Ex10_Iterative_Generation_Execution.java b/src/main/java/es/us/isa/restest/examples/Ex10_Iterative_Generation_Execution.java new file mode 100644 index 00000000..2722a060 --- /dev/null +++ b/src/main/java/es/us/isa/restest/examples/Ex10_Iterative_Generation_Execution.java @@ -0,0 +1,45 @@ +package es.us.isa.restest.examples; + +import es.us.isa.restest.runners.RESTestIterativeRunner; +import es.us.isa.restest.util.PropertyManager; +import es.us.isa.restest.util.RESTestException; + +import java.util.logging.Logger; + +/** + * This example shows how to generate test cases, execute them, and generate an Allure report iteratively using RESTestIterativeRunner. + * This can be used to generate and run test cases in small batches, adding a delay among iterations, to prevent API quota violations. + * Also, this is helpful for generating and executing test cases for long periods of time, or even indefinitely until de process is stopped. + * + * For opening Allure reports in a local browser check cross-origin restrictions: https://stackoverflow.com/questions/51081754/cross-origin-request-blocked-when-loading-local-file + * + * The resources for this example are located at src/main/resources/Examples/Ex10_Iterative_Generation_Execution. + * + */ +public class Ex10_Iterative_Generation_Execution { + + public static final String PROPERTY_FILE_PATH = "src/main/resources/Examples/Ex10_Iterative_Generation_Execution/user_config.properties"; // Path to user properties file with configuration options + + public static final Logger logger = Logger.getLogger(Ex10_Iterative_Generation_Execution.class.getName()); + + public static void main(String[] args) throws RESTestException { + + // Load properties + RESTestIterativeRunner runner = new RESTestIterativeRunner(PROPERTY_FILE_PATH); + + // Run workflow + runner.run(); + + if (logger.isLoggable(java.util.logging.Level.INFO)) { + String message1 = String.format("%d test cases generated and written to %s", runner.getNumberOfTestCases(), runner.getTargetDirJava()); + String message2 = String.format("Allure report available at %s", runner.getAllureReportsPath()); + String message3 = String.format("CSV stats available at %s/%s", PropertyManager.readProperty("data.tests.dir"), runner.getExperimentName()); + String message4 = String.format("Coverage report available at %s/%s", PropertyManager.readProperty("data.coverage.dir"), runner.getExperimentName()); + logger.info(message1); + logger.info(message2); + logger.info(message3); + logger.info(message4); + } + + } +} diff --git a/src/main/java/es/us/isa/restest/examples/Ex1_RandomGeneration.java b/src/main/java/es/us/isa/restest/examples/Ex1_RandomGeneration.java index 16bc00e5..379aa322 100644 --- a/src/main/java/es/us/isa/restest/examples/Ex1_RandomGeneration.java +++ b/src/main/java/es/us/isa/restest/examples/Ex1_RandomGeneration.java @@ -7,6 +7,8 @@ import es.us.isa.restest.writers.restassured.RESTAssuredWriter; import java.util.Collection; +import java.util.logging.Level; +import java.util.logging.Logger; import static es.us.isa.restest.util.FileManager.createDir; @@ -22,11 +24,13 @@ */ public class Ex1_RandomGeneration { - public static String propertyFilePath="src/main/resources/Examples/Ex1_RandomGeneration/user_config.properties"; // Path to user properties file with configuration options + public static final String PROPERTY_FILE_PATH="src/main/resources/Examples/Ex1_RandomGeneration/user_config.properties"; // Path to user properties file with configuration options + + public static final Logger logger = Logger.getLogger(Ex1_RandomGeneration.class.getName()); public static void main(String[] args) throws RESTestException { // Load properties - RESTestLoader loader = new RESTestLoader(propertyFilePath); + RESTestLoader loader = new RESTestLoader(PROPERTY_FILE_PATH); // Create test case generator RandomTestCaseGenerator generator = (RandomTestCaseGenerator) loader.createGenerator(); @@ -39,6 +43,9 @@ public static void main(String[] args) throws RESTestException { RESTAssuredWriter writer = (RESTAssuredWriter) loader.createWriter(); writer.write(testCases); - System.out.println(testCases.size() + " test cases generated and written to " + loader.getTargetDirJava()); + if (logger.isLoggable(Level.INFO)) { + String message = String.format("%d test cases generated and written to %s", testCases.size(), loader.getTargetDirJava()); + logger.info(message); + } } } diff --git a/src/main/java/es/us/isa/restest/examples/Ex2_CreateTestConf.java b/src/main/java/es/us/isa/restest/examples/Ex2_CreateTestConf.java index 40f20cc7..77a2fbf2 100644 --- a/src/main/java/es/us/isa/restest/examples/Ex2_CreateTestConf.java +++ b/src/main/java/es/us/isa/restest/examples/Ex2_CreateTestConf.java @@ -2,20 +2,13 @@ import es.us.isa.restest.configuration.TestConfigurationFilter; import es.us.isa.restest.configuration.generators.DefaultTestConfigurationGenerator; -import es.us.isa.restest.generators.RandomTestCaseGenerator; -import es.us.isa.restest.runners.RESTestLoader; import es.us.isa.restest.specification.OpenAPISpecification; -import es.us.isa.restest.testcases.TestCase; -import es.us.isa.restest.util.RESTestException; -import es.us.isa.restest.writers.restassured.RESTAssuredWriter; import java.util.ArrayList; -import java.util.Collection; import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; -import static es.us.isa.restest.util.FileManager.checkIfExists; -import static es.us.isa.restest.util.FileManager.deleteFile; -import static org.junit.Assert.assertTrue; /** * All RESTest test case generators requires an input test configuration file specifying the API operations to be tested, @@ -28,17 +21,19 @@ */ public class Ex2_CreateTestConf { - public static String specPath="src/main/resources/Examples/Ex2_CreateTestConf/spec_bigoven.yaml"; // Path to OAS specification file - public static String confPath="src/main/resources/Examples/Ex2_CreateTestConf/default_test_conf.yaml"; // Path to test configuration file + public static final String SPEC_PATH = "src/main/resources/Examples/Ex2_CreateTestConf/spec_bigoven.yaml"; // Path to OAS specification file + public static final String CONF_PATH = "src/main/resources/Examples/Ex2_CreateTestConf/default_test_conf.yaml"; // Path to test configuration file + public static final Logger logger = Logger.getLogger(Ex2_CreateTestConf.class.getName()); - public static void main(String[] args) throws RESTestException { + + public static void main(String[] args) { // Load specification file - OpenAPISpecification spec = new OpenAPISpecification(specPath); + OpenAPISpecification spec = new OpenAPISpecification(SPEC_PATH); // Create filters to indicate which operations (paths and http methods) to include in the test configuration file. - List filters = new ArrayList(); + List filters = new ArrayList<>(); TestConfigurationFilter filter = new TestConfigurationFilter(); filter.setPath("/recipes"); filter.addGetMethod(); @@ -46,8 +41,12 @@ public static void main(String[] args) throws RESTestException { // Generate default test configuration file DefaultTestConfigurationGenerator gen = new DefaultTestConfigurationGenerator(spec); - gen.generate(confPath, filters); + gen.generate(CONF_PATH, filters); + + if (logger.isLoggable(Level.INFO)) { + String message = String.format("Default test configuration file generated at %s", CONF_PATH); + logger.info(message); + } - System.out.println("Default test configuration file generated at " + confPath); } } diff --git a/src/main/java/es/us/isa/restest/examples/Ex3_CBTGeneration.java b/src/main/java/es/us/isa/restest/examples/Ex3_CBTGeneration.java index ba5f958c..eeb8905c 100644 --- a/src/main/java/es/us/isa/restest/examples/Ex3_CBTGeneration.java +++ b/src/main/java/es/us/isa/restest/examples/Ex3_CBTGeneration.java @@ -1,13 +1,14 @@ package es.us.isa.restest.examples; import es.us.isa.restest.generators.ConstraintBasedTestCaseGenerator; -import es.us.isa.restest.generators.RandomTestCaseGenerator; import es.us.isa.restest.runners.RESTestLoader; import es.us.isa.restest.testcases.TestCase; import es.us.isa.restest.util.RESTestException; import es.us.isa.restest.writers.restassured.RESTAssuredWriter; import java.util.Collection; +import java.util.logging.Level; +import java.util.logging.Logger; import static es.us.isa.restest.util.FileManager.createDir; @@ -22,11 +23,13 @@ */ public class Ex3_CBTGeneration { - public static String propertyFilePath="src/main/resources/Examples/Ex3_CBTGeneration/user_config.properties"; // Path to user properties file with configuration options + public static final String PROPERTY_FILE_PATH = "src/main/resources/Examples/Ex3_CBTGeneration/user_config.properties"; // Path to user properties file with configuration options + + public static final Logger logger = Logger.getLogger(Ex3_CBTGeneration.class.getName()); public static void main(String[] args) throws RESTestException { // Load properties - RESTestLoader loader = new RESTestLoader(propertyFilePath); + RESTestLoader loader = new RESTestLoader(PROPERTY_FILE_PATH); // Create test case generator ConstraintBasedTestCaseGenerator generator = (ConstraintBasedTestCaseGenerator) loader.createGenerator(); @@ -39,6 +42,10 @@ public static void main(String[] args) throws RESTestException { RESTAssuredWriter writer = (RESTAssuredWriter) loader.createWriter(); writer.write(testCases); - System.out.println(testCases.size() + " test cases generated and written to " + loader.getTargetDirJava()); + if (logger.isLoggable(Level.INFO)) { + String message = String.format("%d test cases generated and written to %s", testCases.size(), loader.getTargetDirJava()); + logger.info(message); + } + } } diff --git a/src/main/java/es/us/isa/restest/examples/Ex4_ARTestGeneration.java b/src/main/java/es/us/isa/restest/examples/Ex4_ARTestGeneration.java new file mode 100644 index 00000000..4d9a3476 --- /dev/null +++ b/src/main/java/es/us/isa/restest/examples/Ex4_ARTestGeneration.java @@ -0,0 +1,52 @@ +package es.us.isa.restest.examples; + +import es.us.isa.restest.generators.ARTestCaseGenerator; +import es.us.isa.restest.runners.RESTestLoader; +import es.us.isa.restest.testcases.TestCase; +import es.us.isa.restest.util.RESTestException; +import es.us.isa.restest.writers.restassured.RESTAssuredWriter; + +import java.util.Collection; +import java.util.logging.Level; +import java.util.logging.Logger; + +import static es.us.isa.restest.util.FileManager.createDir; + +/** + * This example shows how to generate a set of test cases using SemanticGenerator and write them to a file using the RESTAssured writer. + * These types of tests are based on modifying a generated test so that it is entirely different from the previous one. + * + * The resources for this example are located at src/main/resources/Examples/Ex4_ARTestGeneration. + * + * **/ + +public class Ex4_ARTestGeneration { + + // Need to create the file src\test\resources\auth\OMDb\apikeys.json + public static final String PROPERTY_FILE_PATH = "src/main/resources/Examples/Ex4_ARTestGeneration/omdb.properties"; // Path to user properties file with configuration options + + public static final Logger logger = Logger.getLogger(Ex4_ARTestGeneration.class.getName()); + + public static void main(String[] args) throws RESTestException { + // Load properties + RESTestLoader loader = new RESTestLoader(PROPERTY_FILE_PATH); + + // Create test case generator + ARTestCaseGenerator generator = (ARTestCaseGenerator) loader.createGenerator(); + Collection testCases = generator.generate(); + + // Create target directory for test cases if it does not exist + createDir(loader.getTargetDirJava()); + + // Write (RestAssured) test cases + RESTAssuredWriter writer = (RESTAssuredWriter) loader.createWriter(); + writer.write(testCases); + + if (logger.isLoggable(Level.INFO)) { + String message = String.format("%d test cases generated and written to %s", testCases.size(), loader.getTargetDirJava()); + logger.info(message); + } + + } + +} diff --git a/src/main/java/es/us/isa/restest/examples/Ex4_CBTGenerationAuth.java b/src/main/java/es/us/isa/restest/examples/Ex5_CBTGenerationAuth.java similarity index 69% rename from src/main/java/es/us/isa/restest/examples/Ex4_CBTGenerationAuth.java rename to src/main/java/es/us/isa/restest/examples/Ex5_CBTGenerationAuth.java index 08968ea1..be8b0f99 100644 --- a/src/main/java/es/us/isa/restest/examples/Ex4_CBTGenerationAuth.java +++ b/src/main/java/es/us/isa/restest/examples/Ex5_CBTGenerationAuth.java @@ -7,6 +7,8 @@ import es.us.isa.restest.writers.restassured.RESTAssuredWriter; import java.util.Collection; +import java.util.logging.Level; +import java.util.logging.Logger; import static es.us.isa.restest.util.FileManager.createDir; @@ -14,21 +16,23 @@ * This example demonstrates the generation of test cases for a REST API with authentication parameters, * applying the Constraint-Based test case generation approach and utilizing configuration options. * - * - Specify the configuration options in the user properties file located at "src/main/resources/Examples/Ex4_CBTGenerationAuth/youtube_getVideos.properties". + * - Specify the configuration options in the user properties file located at "src/main/resources/Examples/Ex5_CBTGenerationAuth/youtube_getVideos.properties". * - The test cases are generated by randomly selecting values for each input parameter, ensuring the satisfaction of inter-parameter dependencies using a constraint solver (Choco) and IDL. * - The generated test cases are written to a file using the RESTAssured writer. * - For more details on handling inter-parameter dependencies in REST APIs with IDL, refer to the provided resources. * - * The resources for this example are located at src/main/resources/Examples/Ex4_CBTGenerationAuth. + * The resources for this example are located at src/main/resources/Examples/Ex5_CBTGenerationAuth. */ -public class Ex4_CBTGenerationAuth { +public class Ex5_CBTGenerationAuth { - public static String propertyFilePath="src/main/resources/Examples/Ex4_CBTGenerationAuth/youtube_getVideos.properties"; // Path to user properties file with configuration options + public static final String PROPERTY_FILE_PATH = "src/main/resources/Examples/Ex5_CBTGenerationAuth/youtube_getVideos.properties"; // Path to user properties file with configuration options + + public static final Logger logger = Logger.getLogger(Ex5_CBTGenerationAuth.class.getName()); public static void main(String[] args) throws RESTestException { // Load properties - RESTestLoader loader = new RESTestLoader(propertyFilePath); + RESTestLoader loader = new RESTestLoader(PROPERTY_FILE_PATH); // Create test case generator ConstraintBasedTestCaseGenerator generator = (ConstraintBasedTestCaseGenerator) loader.createGenerator(); @@ -41,7 +45,10 @@ public static void main(String[] args) throws RESTestException { RESTAssuredWriter writer = (RESTAssuredWriter) loader.createWriter(); writer.write(testCases); - System.out.println(testCases.size() + " test cases generated and written to " + loader.getTargetDirJava()); + if (logger.isLoggable(Level.INFO)) { + String message = String.format("%d test cases generated and written to %s", testCases.size(), loader.getTargetDirJava()); + logger.info(message); + } } } diff --git a/src/main/java/es/us/isa/restest/examples/Ex5_RandomGeneration_DataMutation.java b/src/main/java/es/us/isa/restest/examples/Ex6_RandomGeneration_DataMutation.java similarity index 69% rename from src/main/java/es/us/isa/restest/examples/Ex5_RandomGeneration_DataMutation.java rename to src/main/java/es/us/isa/restest/examples/Ex6_RandomGeneration_DataMutation.java index 13a165d2..438a1ee0 100644 --- a/src/main/java/es/us/isa/restest/examples/Ex5_RandomGeneration_DataMutation.java +++ b/src/main/java/es/us/isa/restest/examples/Ex6_RandomGeneration_DataMutation.java @@ -7,6 +7,8 @@ import es.us.isa.restest.writers.restassured.RESTAssuredWriter; import java.util.Collection; +import java.util.logging.Level; +import java.util.logging.Logger; import static es.us.isa.restest.util.FileManager.createDir; @@ -17,16 +19,18 @@ * operations, into new JSON objects. These transformed objects may be invalid (although not guaranteed), allowing developers * to test various data scenarios. * - * The resources for this example are located at src/main/resources/Examples/Ex5_RandomGeneration_DataMutation. + * The resources for this example are located at src/main/resources/Examples/Ex6_RandomGeneration_DataMutation. * */ -public class Ex5_RandomGeneration_DataMutation { +public class Ex6_RandomGeneration_DataMutation { - public static String propertyFilePath="src/main/resources/Examples/Ex5_RandomGeneration_DataMutation/events.properties"; // Path to user properties file with configuration options + public static final String PROPERTY_FILE_PATH = "src/main/resources/Examples/Ex6_RandomGeneration_DataMutation/events.properties"; // Path to user properties file with configuration options + + public static final Logger logger = Logger.getLogger(Ex6_RandomGeneration_DataMutation.class.getName()); public static void main(String[] args) throws RESTestException { // Load properties - RESTestLoader loader = new RESTestLoader(propertyFilePath); + RESTestLoader loader = new RESTestLoader(PROPERTY_FILE_PATH); // Create test case generator RandomTestCaseGenerator generator = (RandomTestCaseGenerator) loader.createGenerator(); @@ -40,5 +44,10 @@ public static void main(String[] args) throws RESTestException { writer.write(testCases); System.out.println(testCases.size() + " test cases generated and written to " + loader.getTargetDirJava()); + + if (logger.isLoggable(Level.INFO)) { + String message = String.format("%d test cases generated and written to %s", testCases.size(), loader.getTargetDirJava()); + logger.info(message); + } } } diff --git a/src/main/java/es/us/isa/restest/examples/Ex6_CBTStatefulGeneration.java b/src/main/java/es/us/isa/restest/examples/Ex7_CBTStatefulGeneration.java similarity index 61% rename from src/main/java/es/us/isa/restest/examples/Ex6_CBTStatefulGeneration.java rename to src/main/java/es/us/isa/restest/examples/Ex7_CBTStatefulGeneration.java index c8f262e9..f5f50f32 100644 --- a/src/main/java/es/us/isa/restest/examples/Ex6_CBTStatefulGeneration.java +++ b/src/main/java/es/us/isa/restest/examples/Ex7_CBTStatefulGeneration.java @@ -8,11 +8,11 @@ * The resources for this example are located at src/main/resources/Examples/Ex1_RandomGeneration. * */ -public class Ex6_CBTStatefulGeneration { +public class Ex7_CBTStatefulGeneration { - public static String propertyFilePath="TODO"; // Path to user properties file with configuration options + public static final String PROPERTY_FILE_PATH = "TODO"; // Path to user properties file with configuration options public static void main(String[] args) throws RESTestException { - + // TODO } } diff --git a/src/main/java/es/us/isa/restest/examples/Ex8_Generation_Execution.java b/src/main/java/es/us/isa/restest/examples/Ex8_Generation_Execution.java deleted file mode 100644 index e183b7e9..00000000 --- a/src/main/java/es/us/isa/restest/examples/Ex8_Generation_Execution.java +++ /dev/null @@ -1,30 +0,0 @@ -package es.us.isa.restest.examples; - -import es.us.isa.restest.runners.RESTestRunner; -import es.us.isa.restest.util.PropertyManager; -import es.us.isa.restest.util.RESTestException; - -/** - * This example shows how to generate test cases, execute them, and generate an Allure report in a single run using RESTestRunner. - * For opening Allure reports in a local browser check cross-origin restrictions: https://stackoverflow.com/questions/51081754/cross-origin-request-blocked-when-loading-local-file - * - * The resources for this example are located at src/main/resources/Examples/Ex8_Generation_Execution. - * - */ -public class Ex8_Generation_Execution { - - public static String propertyFilePath="src/main/resources/Examples/Ex8_Generation_Execution/user_config.properties"; // Path to user properties file with configuration options - - public static void main(String[] args) throws RESTestException { - // Load properties - RESTestRunner runner = new RESTestRunner(propertyFilePath); - - // Run workflow - runner.run(); - - System.out.println(runner.getNumberOfTestCases() + " test cases generated and written to " + runner.getTargetDirJava()); - System.out.println("Allure report available at " + runner.getAllureReportsPath()); - System.out.println("CSV stats available at " + PropertyManager.readProperty("data.tests.dir") + "/" + runner.getExperimentName()); - System.out.println("Coverage report available at " + PropertyManager.readProperty("data.coverage.dir") + "/" + runner.getExperimentName()); - } -} diff --git a/src/main/java/es/us/isa/restest/examples/Ex7_TestExecution.java b/src/main/java/es/us/isa/restest/examples/Ex8_TestExecution.java similarity index 84% rename from src/main/java/es/us/isa/restest/examples/Ex7_TestExecution.java rename to src/main/java/es/us/isa/restest/examples/Ex8_TestExecution.java index f5343b91..0186a8eb 100644 --- a/src/main/java/es/us/isa/restest/examples/Ex7_TestExecution.java +++ b/src/main/java/es/us/isa/restest/examples/Ex8_TestExecution.java @@ -6,14 +6,14 @@ * TODO * This example demonstrates how to execute a previously generated set of tests using the RESTestExecutor class. To do this, * the following parameters need to be specified: targetDir (destination directory of tests generated), testClassName (test class name), - * and packageName (package name), this information can be found in the user properties file (see src/main/resources/Examples/Ex7_TestExecution/user_conf.properties). + * and packageName (package name), this information can be found in the user properties file (see src/main/resources/Examples/Ex8_TestExecution/user_conf.properties). * - * The resources for this example are located at src/main/resources/Examples/Ex7_TestExecution. + * The resources for this example are located at src/main/resources/Examples/Ex8_TestExecution. * */ -public class Ex7_TestExecution { +public class Ex8_TestExecution { public static void main(String[] args) throws RESTestException { - + // TODO } } diff --git a/src/main/java/es/us/isa/restest/examples/Ex9_Generation_Execution.java b/src/main/java/es/us/isa/restest/examples/Ex9_Generation_Execution.java new file mode 100644 index 00000000..d27ebad3 --- /dev/null +++ b/src/main/java/es/us/isa/restest/examples/Ex9_Generation_Execution.java @@ -0,0 +1,41 @@ +package es.us.isa.restest.examples; + +import es.us.isa.restest.runners.RESTestRunner; +import es.us.isa.restest.util.PropertyManager; +import es.us.isa.restest.util.RESTestException; + +import java.util.logging.Logger; + +/** + * This example shows how to generate test cases, execute them, and generate an Allure report in a single run using RESTestRunner. + * For opening Allure reports in a local browser check cross-origin restrictions: https://stackoverflow.com/questions/51081754/cross-origin-request-blocked-when-loading-local-file + * + * The resources for this example are located at src/main/resources/Examples/Ex9_Generation_Execution. + * + */ +public class Ex9_Generation_Execution { + + public static final String PROPERTY_FILE_PATH = "src/main/resources/Examples/Ex9_Generation_Execution/user_config.properties"; // Path to user properties file with configuration options + + public static final Logger logger = Logger.getLogger(Ex9_Generation_Execution.class.getName()); + + public static void main(String[] args) throws RESTestException { + // Load properties + RESTestRunner runner = new RESTestRunner(PROPERTY_FILE_PATH); + + // Run workflow + runner.run(); + + if (logger.isLoggable(java.util.logging.Level.INFO)) { + String message1 = String.format("%d test cases generated and written to %s", runner.getNumberOfTestCases(), runner.getTargetDirJava()); + String message2 = String.format("Allure report available at %s", runner.getAllureReportsPath()); + String message3 = String.format("CSV stats available at %s/%s", PropertyManager.readProperty("data.tests.dir"), runner.getExperimentName()); + String message4 = String.format("Coverage report available at %s/%s", PropertyManager.readProperty("data.coverage.dir"), runner.getExperimentName()); + logger.info(message1); + logger.info(message2); + logger.info(message3); + logger.info(message4); + } + + } +} diff --git a/src/main/java/es/us/isa/restest/examples/Ex9_Iterative_Generation_Execution.java b/src/main/java/es/us/isa/restest/examples/Ex9_Iterative_Generation_Execution.java deleted file mode 100644 index d8a04400..00000000 --- a/src/main/java/es/us/isa/restest/examples/Ex9_Iterative_Generation_Execution.java +++ /dev/null @@ -1,34 +0,0 @@ -package es.us.isa.restest.examples; - -import es.us.isa.restest.runners.RESTestIterativeRunner; -import es.us.isa.restest.util.PropertyManager; -import es.us.isa.restest.util.RESTestException; - -/** - * This example shows how to generate test cases, execute them, and generate an Allure report iteratively using RESTestIterativeRunner. - * This can be used to generate and run test cases in small batches, adding a delay among iterations, to prevent API quota violations. - * Also, this is helpful for generating and executing test cases for long periods of time, or even indefinitely until de process is stopped. - * - * For opening Allure reports in a local browser check cross-origin restrictions: https://stackoverflow.com/questions/51081754/cross-origin-request-blocked-when-loading-local-file - * - * The resources for this example are located at src/main/resources/Examples/Ex9_Iterative_Generation_Execution. - * - */ -public class Ex9_Iterative_Generation_Execution { - - public static String propertyFilePath="src/main/resources/Examples/Ex9_Iterative_Generation_Execution/user_config.properties"; // Path to user properties file with configuration options - - public static void main(String[] args) throws RESTestException { - - // Load properties - RESTestIterativeRunner runner = new RESTestIterativeRunner(propertyFilePath); - - // Run workflow - runner.run(); - - System.out.println(runner.getNumberOfTestCases() + " test cases generated and written to " + runner.getTargetDirJava()); - System.out.println("Allure report available at " + runner.getAllureReportsPath()); - System.out.println("CSV stats available at " + PropertyManager.readProperty("data.tests.dir") + "/" + runner.getExperimentName()); - System.out.println("Coverage report available at " + PropertyManager.readProperty("data.coverage.dir") + "/" + runner.getExperimentName()); - } -} diff --git a/src/main/resources/Examples/Ex8_Generation_Execution/spec_iceandfire.yaml b/src/main/resources/Examples/Ex10_Iterative_Generation_Execution/spec_iceandfire.yaml similarity index 100% rename from src/main/resources/Examples/Ex8_Generation_Execution/spec_iceandfire.yaml rename to src/main/resources/Examples/Ex10_Iterative_Generation_Execution/spec_iceandfire.yaml diff --git a/src/main/resources/Examples/Ex8_Generation_Execution/test_conf.yaml b/src/main/resources/Examples/Ex10_Iterative_Generation_Execution/test_conf.yaml similarity index 100% rename from src/main/resources/Examples/Ex8_Generation_Execution/test_conf.yaml rename to src/main/resources/Examples/Ex10_Iterative_Generation_Execution/test_conf.yaml diff --git a/src/main/resources/Examples/Ex9_Iterative_Generation_Execution/user_config.properties b/src/main/resources/Examples/Ex10_Iterative_Generation_Execution/user_config.properties similarity index 87% rename from src/main/resources/Examples/Ex9_Iterative_Generation_Execution/user_config.properties rename to src/main/resources/Examples/Ex10_Iterative_Generation_Execution/user_config.properties index 05632073..3a03d752 100644 --- a/src/main/resources/Examples/Ex9_Iterative_Generation_Execution/user_config.properties +++ b/src/main/resources/Examples/Ex10_Iterative_Generation_Execution/user_config.properties @@ -1,8 +1,8 @@ # OAS specification -oas.path=src/main/resources/Examples/Ex9_Iterative_Generation_Execution/spec_iceandfire.yaml +oas.path=src/main/resources/Examples/Ex10_Iterative_Generation_Execution/spec_iceandfire.yaml # Test configuration file -conf.path=src/main/resources/Examples/Ex9_Iterative_Generation_Execution/test_conf.yaml +conf.path=src/main/resources/Examples/Ex10_Iterative_Generation_Execution/test_conf.yaml # Directory where the test cases will be generated test.target.dir=src/generation/java/anApiOfIceAndFire @@ -59,7 +59,7 @@ inputdatamaxvalues=100 allure.report=true # Path to the directory where Allure will save the report -allure.report.dir=src/main/resources/Examples/Ex9_Iterative_Generation_Execution/allure_report +allure.report.dir=src/main/resources/Examples/Ex10_Iterative_Generation_Execution/allure_report # ================== # CSV STATS REPORTS diff --git a/src/main/resources/Examples/Ex4_ARTestGeneration/omdb.properties b/src/main/resources/Examples/Ex4_ARTestGeneration/omdb.properties new file mode 100644 index 00000000..fab16820 --- /dev/null +++ b/src/main/resources/Examples/Ex4_ARTestGeneration/omdb.properties @@ -0,0 +1,59 @@ +# ADD HERE ANY EXTRA INFORMATION TO BE DISPLAY IN THE TEST REPORT + +# API name +api=OMDb + +# CONFIGURATION PARAMETERS + +# Test case generator +generator=ART + +# Number of test cases to be generated per operation on each iteration +testsperoperation=100 + +# OAS specification +oas.path=src/main/resources/Examples/Ex4_ARTestGeneration/swagger.yaml + +# Test configuration file +conf.path=src/main/resources/Examples/Ex4_ARTestGeneration/testConfSemantic.yaml + +# Directory where the test cases will be generated +test.target.dir=src/main/resources/Examples/Ex4_ARTestGeneration/test_cases + +# Package name +test.target.package=omdb + +# Experiment name (for naming related folders and files) +experiment.name=omdb + +# Name of the test class to be generated +testclass.name=OMDbTest + +# Measure input coverage +coverage.input=true + +# Measure output coverage +coverage.output=true + +# Enable CSV statistics +stats.csv=true + +# Maximum number of test cases to be generated +numtotaltestcases=100 + +# Optional delay between each iteration (in seconds) +delay=3600 + +# Ratio of faulty test cases to be generated (negative testing) +faulty.ratio=0.5 + +# CONFIGURATION SETTINGS FOR CONSTRAINT-BASED TESTING + +# Ratio of faulty test cases to be generated due to broken dependencies. +faulty.dependency.ratio=0.5 + +# Number of test cases after which new test data will be loaded. +reloadinputdataevery=100 + +# Max number of data values for each parameter +inputdatamaxvalues=1000 diff --git a/src/main/resources/Examples/Ex4_ARTestGeneration/swagger.yaml b/src/main/resources/Examples/Ex4_ARTestGeneration/swagger.yaml new file mode 100644 index 00000000..3d4bb180 --- /dev/null +++ b/src/main/resources/Examples/Ex4_ARTestGeneration/swagger.yaml @@ -0,0 +1,247 @@ +swagger: '2.0' +info: + description: >- + This API requires authorization, you can get a free key here: + [http://omdbapi.com/apikey.aspx](http://omdbapi.com/apikey.aspx) + version: '1.0' + title: OMDb API + termsOfService: 'http://omdbapi.com/legal.htm' + contact: + email: bfritz@fadingsignal.com + license: + name: CC BY-NC 4.0 + url: 'https://creativecommons.org/licenses/by-nc/4.0/' +host: omdbapi.com +basePath: / +tags: + - name: Search +schemes: + - https +security: + - APIKeyQueryParam: [] +paths: + /: + get: + tags: + - Search + summary: Search + operationId: search + parameters: + - name: t + in: query + description: Title of movie or series + required: false + type: string + - name: i + in: query + description: A valid IMDb ID (e.g. tt0000001) + required: false + type: string + - name: s + in: query + description: Title of movie or series. airport code + required: false + type: string + - name: page + in: query + description: Page number to return + required: false + type: integer + - name: y + in: query + description: Year of release + required: false + type: integer + - name: type + in: query + description: Return movie or series + required: false + type: string + enum: + - movie + - series + - episode + - name: plot + in: query + description: Return short or full plot + required: false + type: string + enum: + - short + - full + - name: r + in: query + description: The response type to return + required: false + type: string + enum: + - json + - xml + - name: callback + in: query + description: JSONP callback name + required: false + type: string + x-dependencies: + - OnlyOne(i OR t, s); + responses: + '200': + description: Successful operation + schema: + $ref: "#/definitions/Response" + '401': + description: Not authenticated + schema: + $ref: "#/definitions/Error" +# security: +# - APIKeyQueryParam: [] +definitions: + Response: + type: object + required: + - Response + properties: + Response: + type: string + enum: + - "True" + - "False" + example: "True" + Error: + type: string + example: No API key provided. + Search: + type: array + items: + type: object + properties: + Title: + type: string + example: This Is the End + Year: + type: string + example: 2013 + imdbID: + type: string + example: tt1245492 + Type: + type: string + example: movie + Poster: + type: string + example: https://m.media-amazon.com/images/M/MV5BMTQxODE3NjM1Ml5BMl5BanBnXkFtZTcwMzkzNjc4OA@@._V1_SX300.jpg + totalResults: + type: integer + example: 2 + Title: + type: string + example: This Is the End + Year: + type: string + example: 2013 + Rated: + type: string + example: R + Released: + type: string + example: 12 Jun 2013 + Runtime: + type: string + example: 107 min + Genre: + type: string + example: Comedy + Director: + type: string + example: Evan Goldberg, Seth Rogen + Writer: + type: string + example: Seth Rogen (screenplay), Evan Goldberg (screenplay), Seth Rogen (screen story), Evan Goldberg (screen story), Seth Rogen (short film \"Jay and Seth vs. The Apocalypse\"), Jason Stone (based on the short film \"Jay and Seth vs. The Apocalypse\" by), Evan Goldberg (short film \"Jay and Seth vs. The Apocalypse\") + Actors: + type: string + example: James Franco, Jonah Hill, Seth Rogen, Jay Baruchel + Plot: + type: string + example: 6 Los Angeles celebrities are stuck in James Franco's house after a series of devastating events just destroyed the city. Inside, the group not only have to face the apocalypse, but themselves. + Language: + type: string + example: English, Spanish + Country: + type: string + example: USA + Awards: + type: string + example: 10 wins & 20 nominations. + Poster: + type: string + example: https://m.media-amazon.com/images/M/MV5BMTQxODE3NjM1Ml5BMl5BanBnXkFtZTcwMzkzNjc4OA@@._V1_SX300.jpg + Ratings: + type: array + items: + type: object + properties: + Source: + type: string + example: Internet Movie Database + Value: + type: string + example: 6.6/10 + example: + Metascore: + type: string + example: 67 + imdbRating: + type: string + example: 6.6 + imdbVotes: + type: string + example: 370,080 + imdbID: + type: string + example: tt1245492 + Type: + type: string + example: movie + DVD: + type: string + example: 01 Oct 2013 + BoxOffice: + type: string + example: $96,200,000 + Production: + type: string + example: Sony Pictures + Website: + type: string + example: N/A + Episode: + type: string + example: 4 + Season: + type: string + example: 16 + seriesID: + type: string + example: tt0341939 + totalSeasons: + type: string + example: 2 + Error: + type: object + required: + - Response + - Error + properties: + Response: + type: string + enum: + - "False" + example: "False" + Error: + type: string + example: No API key provided. +securityDefinitions: + APIKeyQueryParam: + type: apiKey + name: apikey + in: query \ No newline at end of file diff --git a/src/main/resources/Examples/Ex4_ARTestGeneration/testConfSemantic.yaml b/src/main/resources/Examples/Ex4_ARTestGeneration/testConfSemantic.yaml new file mode 100644 index 00000000..344d03b1 --- /dev/null +++ b/src/main/resources/Examples/Ex4_ARTestGeneration/testConfSemantic.yaml @@ -0,0 +1,149 @@ +--- +auth: + required: true + queryParams: {} + headerParams: {} + apiKeysPath: OMDb/apikeys.json + headersPath: null +testConfiguration: + operations: + - testPath: / + operationId: search + method: get + testParameters: + - name: t + in: query + weight: 0.5 + generators: + - type: RandomInputValue + genParameters: + - name: csv + values: + - src/main/resources/TestData/Generated/OMDb API/search_t.csv + objectValues: null + - name: predicates + values: + - http://dbpedia.org/property/title + objectValues: null + - name: numberOfTriesToGenerateRegex + values: + - 0 + objectValues: null + valid: true + - name: i + in: query + weight: 0.5 + generators: + - type: RandomRegExp + genParameters: + - name: regExp + values: + - "tt(([0-1][0-9])|(2[0-3]))\\d\\d\\d\\d\\d" + objectValues: null + valid: true + - name: s + in: query + weight: 0.5 + generators: + - type: RandomInputValue + genParameters: + - name: csv + values: + - src/main/resources/TestData/Generated/OMDb API/search_s.csv + objectValues: null + - name: predicates + values: + - http://dbpedia.org/property/series + objectValues: null + - name: numberOfTriesToGenerateRegex + values: + - 0 + objectValues: null + valid: true + - name: page + in: query + weight: 0.5 + generators: + - type: RandomNumber + genParameters: + - name: type + values: + - integer + objectValues: null + - name: min + values: + - 1 + objectValues: null + - name: max + values: + - 100 + objectValues: null + valid: true + - name: "y" + in: query + weight: 0.5 + generators: + - type: RandomInputValue + genParameters: + - name: csv + values: + - src/main/resources/TestData/Generated/OMDb API/search_y.csv + objectValues: null + - name: predicates + values: + - http://dbpedia.org/property/year + objectValues: null + - name: numberOfTriesToGenerateRegex + values: + - 0 + objectValues: null + valid: true + - name: type + in: query + weight: 0.5 + generators: + - type: RandomInputValue + genParameters: + - name: values + values: + - movie + - series + - episode + objectValues: null + valid: true + - name: plot + in: query + weight: 0.5 + generators: + - type: RandomInputValue + genParameters: + - name: values + values: + - short + - full + objectValues: null + valid: true + - name: r + in: query + weight: 0.0 + generators: + - type: RandomInputValue + genParameters: + - name: values + values: + - json + - xml + objectValues: null + valid: true + - name: callback + in: query + weight: 0.0 + generators: + - type: RandomEnglishWord + genParameters: + - name: maxWords + values: + - 1 + objectValues: null + valid: true + expectedResponse: 200 diff --git a/src/main/resources/Examples/Ex4_CBTGenerationAuth/openapi.yaml b/src/main/resources/Examples/Ex5_CBTGenerationAuth/openapi.yaml similarity index 100% rename from src/main/resources/Examples/Ex4_CBTGenerationAuth/openapi.yaml rename to src/main/resources/Examples/Ex5_CBTGenerationAuth/openapi.yaml diff --git a/src/main/resources/Examples/Ex4_CBTGenerationAuth/testConf_getVideos.yaml b/src/main/resources/Examples/Ex5_CBTGenerationAuth/testConf_getVideos.yaml similarity index 100% rename from src/main/resources/Examples/Ex4_CBTGenerationAuth/testConf_getVideos.yaml rename to src/main/resources/Examples/Ex5_CBTGenerationAuth/testConf_getVideos.yaml diff --git a/src/main/resources/Examples/Ex4_CBTGenerationAuth/youtube_getVideos.properties b/src/main/resources/Examples/Ex5_CBTGenerationAuth/youtube_getVideos.properties similarity index 75% rename from src/main/resources/Examples/Ex4_CBTGenerationAuth/youtube_getVideos.properties rename to src/main/resources/Examples/Ex5_CBTGenerationAuth/youtube_getVideos.properties index 237a4322..78e08f75 100644 --- a/src/main/resources/Examples/Ex4_CBTGenerationAuth/youtube_getVideos.properties +++ b/src/main/resources/Examples/Ex5_CBTGenerationAuth/youtube_getVideos.properties @@ -5,13 +5,13 @@ generator=CBT testsperoperation=20 # OAS specification -oas.path=src/main/resources/Examples/Ex4_CBTGenerationAuth/openapi.yaml +oas.path=src/main/resources/Examples/Ex5_CBTGenerationAuth/openapi.yaml # Test configuration file -conf.path=src/main/resources/Examples/Ex4_CBTGenerationAuth/testConf_getVideos.yaml +conf.path=src/main/resources/Examples/Ex5_CBTGenerationAuth/testConf_getVideos.yaml # Directory where the test cases will be generated -test.target.dir=src/main/resources/Examples/Ex4_CBTGenerationAuth/test_cases +test.target.dir=src/main/resources/Examples/Ex5_CBTGenerationAuth/test_cases # Package name test.target.package=youtubeGetVideos diff --git a/src/main/resources/Examples/Ex5_RandomGeneration_DataMutation/events.properties b/src/main/resources/Examples/Ex6_RandomGeneration_DataMutation/events.properties similarity index 76% rename from src/main/resources/Examples/Ex5_RandomGeneration_DataMutation/events.properties rename to src/main/resources/Examples/Ex6_RandomGeneration_DataMutation/events.properties index f2a96c0e..52dda07a 100644 --- a/src/main/resources/Examples/Ex5_RandomGeneration_DataMutation/events.properties +++ b/src/main/resources/Examples/Ex6_RandomGeneration_DataMutation/events.properties @@ -1,11 +1,11 @@ # Path to the specification file -oas.path=src/main/resources/Examples/Ex5_RandomGeneration_DataMutation/swagger.yaml +oas.path=src/main/resources/Examples/Ex6_RandomGeneration_DataMutation/swagger.yaml # Path to the test configuration file -conf.path=src/main/resources/Examples/Ex5_RandomGeneration_DataMutation/testConf.yaml +conf.path=src/main/resources/Examples/Ex6_RandomGeneration_DataMutation/testConf.yaml # Path to the directory where the test cases will be generated -target.dir.java=src/generation/java/Ex5_RandomGeneration_DataMutation/test_cases +target.dir.java=src/generation/java/Ex6_RandomGeneration_DataMutation/test_cases # Experiment name (string used to identify the artefacts generated by RESTest in this execution) experiment.name=Example5 diff --git a/src/main/resources/Examples/Ex5_RandomGeneration_DataMutation/swagger.yaml b/src/main/resources/Examples/Ex6_RandomGeneration_DataMutation/swagger.yaml similarity index 100% rename from src/main/resources/Examples/Ex5_RandomGeneration_DataMutation/swagger.yaml rename to src/main/resources/Examples/Ex6_RandomGeneration_DataMutation/swagger.yaml diff --git a/src/main/resources/Examples/Ex5_RandomGeneration_DataMutation/testConf.yaml b/src/main/resources/Examples/Ex6_RandomGeneration_DataMutation/testConf.yaml similarity index 100% rename from src/main/resources/Examples/Ex5_RandomGeneration_DataMutation/testConf.yaml rename to src/main/resources/Examples/Ex6_RandomGeneration_DataMutation/testConf.yaml diff --git a/src/main/resources/Examples/Ex7_TestExecution/openapi.yaml b/src/main/resources/Examples/Ex8_TestExecution/openapi.yaml similarity index 100% rename from src/main/resources/Examples/Ex7_TestExecution/openapi.yaml rename to src/main/resources/Examples/Ex8_TestExecution/openapi.yaml diff --git a/src/main/resources/Examples/Ex7_TestExecution/testConf.yaml b/src/main/resources/Examples/Ex8_TestExecution/testConf.yaml similarity index 100% rename from src/main/resources/Examples/Ex7_TestExecution/testConf.yaml rename to src/main/resources/Examples/Ex8_TestExecution/testConf.yaml diff --git a/src/main/resources/Examples/Ex7_TestExecution/user_config.properties b/src/main/resources/Examples/Ex8_TestExecution/user_config.properties similarity index 87% rename from src/main/resources/Examples/Ex7_TestExecution/user_config.properties rename to src/main/resources/Examples/Ex8_TestExecution/user_config.properties index 26f25506..fdfd095f 100644 --- a/src/main/resources/Examples/Ex7_TestExecution/user_config.properties +++ b/src/main/resources/Examples/Ex8_TestExecution/user_config.properties @@ -1,11 +1,11 @@ # OAS specification -oas.path=src/main/resources/Examples/Ex7_TestExecution/openapi.yaml +oas.path=src/main/resources/Examples/Ex8_TestExecution/openapi.yaml # Test configuration file -conf.path=src/main/resources/Examples/Ex7_TestExecution/testConf.yaml +conf.path=src/main/resources/Examples/Ex8_TestExecution/testConf.yaml # Directory where the test cases will be generated -test.target.dir=src/main/resources/Examples/Ex7_TestExecution/test_cases +test.target.dir=src/main/resources/Examples/Ex8_TestExecution/test_cases # Package name test.target.package=restcountries @@ -55,7 +55,7 @@ inputdatamaxvalues=100 allure.report=true # Path to the directory where Allure will save the report -allure.report.dir=src/main/resources/Examples/Ex7_TestExecution/allure_report +allure.report.dir=src/main/resources/Examples/Ex8_TestExecution/allure_report # ================== # CSV STATS REPORTS diff --git a/src/main/resources/Examples/Ex9_Iterative_Generation_Execution/spec_iceandfire.yaml b/src/main/resources/Examples/Ex9_Generation_Execution/spec_iceandfire.yaml similarity index 100% rename from src/main/resources/Examples/Ex9_Iterative_Generation_Execution/spec_iceandfire.yaml rename to src/main/resources/Examples/Ex9_Generation_Execution/spec_iceandfire.yaml diff --git a/src/main/resources/Examples/Ex9_Iterative_Generation_Execution/test_conf.yaml b/src/main/resources/Examples/Ex9_Generation_Execution/test_conf.yaml similarity index 100% rename from src/main/resources/Examples/Ex9_Iterative_Generation_Execution/test_conf.yaml rename to src/main/resources/Examples/Ex9_Generation_Execution/test_conf.yaml diff --git a/src/main/resources/Examples/Ex8_Generation_Execution/user_config.properties b/src/main/resources/Examples/Ex9_Generation_Execution/user_config.properties similarity index 90% rename from src/main/resources/Examples/Ex8_Generation_Execution/user_config.properties rename to src/main/resources/Examples/Ex9_Generation_Execution/user_config.properties index 388fc466..3f781b23 100644 --- a/src/main/resources/Examples/Ex8_Generation_Execution/user_config.properties +++ b/src/main/resources/Examples/Ex9_Generation_Execution/user_config.properties @@ -1,8 +1,8 @@ # OAS specification -oas.path=src/main/resources/Examples/Ex8_Generation_Execution/spec_iceandfire.yaml +oas.path=src/main/resources/Examples/Ex9_Generation_Execution/spec_iceandfire.yaml # Test configuration file -conf.path=src/main/resources/Examples/Ex8_Generation_Execution/test_conf.yaml +conf.path=src/main/resources/Examples/Ex9_Generation_Execution/test_conf.yaml # Directory where the test cases will be generated test.target.dir=src/generation/java/anApiOfIceAndFire @@ -55,7 +55,7 @@ inputdatamaxvalues=100 allure.report=true # Path to the directory where Allure will save the report -allure.report.dir=src/main/resources/Examples/Ex8_Generation_Execution/allure_report +allure.report.dir=src/main/resources/Examples/Ex9_Generation_Execution/allure_report # ================== # CSV STATS REPORTS