es.upm.dit.gsi.beast.reader.system
Class SystemReader

java.lang.Object
  extended by es.upm.dit.gsi.beast.reader.Reader
      extended by es.upm.dit.gsi.beast.reader.system.SystemReader

public class SystemReader
extends Reader

Project: beast File: es.upm.dit.gsi.beast.reader.system.SystemReader.java Main class to transform the plain text given by the client to the necessary classes to run each Test. These classes are the Scenario, Setup and Evaluation, which emulate the GIVEN, WHEN and THEN parts of the plain text; the .story file whit the plain text of the test and the its .java class with the same name to interpret it. Furthermore, one casemanager must be created, which will run all the tests. Grupo de Sistemas Inteligentes Departamento de Ingeniería de Sistemas Telemáticos Universidad Politécnica de Madrid (UPM)

Version:
0.3
Author:
Alberto Mardomingo, Jorge Solitario, alvarocarrera

Field Summary
 
Fields inherited from class es.upm.dit.gsi.beast.reader.Reader
MAS, SYSTEM
 
Constructor Summary
SystemReader()
           
 
Method Summary
static void generateJavaFiles(String requirementsFolder, String platformName, String src_test_dir, String tests_package, String casemanager_package, String loggingPropFile)
          Main method of the class, which handles the process of creating the tests
static void generateJavaFilesForOneStory(String storyFilePath, String platformName, String src_test_dir, String tests_package, String casemanager_package, String loggingPropFile)
          Main method of the class, which handles all the process to create all tests.
static void main(String[] args)
          Main method to start reading the plain text given by the client
 
Methods inherited from class es.upm.dit.gsi.beast.reader.Reader
changeFirstLetterToCapital, changeFirstLetterToLowerCase, createClassName, createDotStoryFile, createDotStoryName, createFileReader, createFileWriter, createFirstLowCaseName, createFolder, createFolderPath, createTestPath, fileDoesNotExist, generateJavaFiles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemReader

public SystemReader()
Method Detail

generateJavaFiles

public static void generateJavaFiles(String requirementsFolder,
                                     String platformName,
                                     String src_test_dir,
                                     String tests_package,
                                     String casemanager_package,
                                     String loggingPropFile)
                              throws Exception
Main method of the class, which handles the process of creating the tests

Parameters:
requirementsFolder - , it is the folder where the plain text given by the client is stored
platformName - , to choose the MAS platform (JADE, JADEX, etc.)
src_test_dir - , the folder where our classes are created
tests_package - , the name of the package where the stories are created
casemanager_package - , the path where casemanager must be created
loggingPropFile - , properties file
Throws:
Exception - , if any error is found in the configuration

generateJavaFilesForOneStory

public static void generateJavaFilesForOneStory(String storyFilePath,
                                                String platformName,
                                                String src_test_dir,
                                                String tests_package,
                                                String casemanager_package,
                                                String loggingPropFile)
                                         throws Exception
Main method of the class, which handles all the process to create all tests.

Parameters:
storyFilePath - , it is the folder where the plain text given by the client is stored
platformName - , to choose the MAS platform (JADE, JADEX, etc.)
src_test_dir - , the folder where our classes are created
tests_package - , the name of the package where the stories are created
casemanager_package - , the path where casemanager must be created
loggingPropFile - , properties file
Throws:
Exception - , if any error is found in the configuration

main

public static void main(String[] args)
                 throws Exception
Main method to start reading the plain text given by the client

Parameters:
args - , where arg[0] is Beast configuration file (beast.properties) and arg[1] is Logger configuration file (logger.properties)
Throws:
Exception


Copyright © 2014 Grupo de Sistemas Inteligentes - Universidad Politécnica de Madrid. All Rights Reserved.