Class JunitController
java.lang.Object
de.hybris.platform.testweb.controllers.JunitController
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbindTestFilterFormEditors(org.springframework.web.bind.WebDataBinder binder) voidbindTestSuiteFormEditors(org.springframework.web.bind.WebDataBinder binder) org.springframework.web.servlet.ModelAndViewhandleExceptions(Exception exception) index(org.springframework.ui.Model model, TestFilterData testFilterData, TestSuitesData testSuitesData) Renders page with forms to execute tests.voidinit()initialize(org.springframework.web.servlet.mvc.support.RedirectAttributes model) Initializes test system.booleanloadTestCases(javax.servlet.http.HttpServletRequest request) AJAX aware method which returns list of test cases for test suite.org.springframework.http.HttpEntity<byte[]>runAllTests(javax.servlet.http.HttpServletRequest request) Executes all tests in current extensions set.org.springframework.http.HttpEntity<byte[]>runDemoTests(javax.servlet.http.HttpServletRequest request) Executes demo tests in current extensions set.org.springframework.http.HttpEntity<byte[]>runIntegrationTests(javax.servlet.http.HttpServletRequest request) Executes integration tests in current extensions set.org.springframework.http.HttpEntity<byte[]>runManualTests(javax.servlet.http.HttpServletRequest request) Executes manual tests in current extensions set.org.springframework.http.HttpEntity<byte[]>runPerformanceTests(javax.servlet.http.HttpServletRequest request) Executes performance tests in current extensions set.runTestsByFilter(org.springframework.ui.Model model, TestFilterData testFilterData) Executes all tests from *filter* aware form.runTestsByTestCases(org.springframework.ui.Model model, SingleTestCaseData testCaseData) runTestsByTestSuites(org.springframework.ui.Model model, TestSuitesData testSuitesData) Executes all tests from test suites aware form.org.springframework.http.HttpEntity<byte[]>runTestsCases(javax.servlet.http.HttpServletRequest request) Executes tests for test suites passed in parameter *names*.org.springframework.http.HttpEntity<byte[]>runUnitTests(javax.servlet.http.HttpServletRequest request) Executes unit tests in current extensions set.
-
Constructor Details
-
JunitController
public JunitController()
-
-
Method Details
-
init
@PostConstruct public void init() -
index
@RequestMapping("/") public String index(org.springframework.ui.Model model, @ModelAttribute("testFilter") TestFilterData testFilterData, @ModelAttribute("testSuite") TestSuitesData testSuitesData) Renders page with forms to execute tests. -
loadTestCases
@RequestMapping(value="/loadTestCases", method=POST, headers="Accept=application/json") @ResponseBody public List<String> loadTestCases(javax.servlet.http.HttpServletRequest request) AJAX aware method which returns list of test cases for test suite. Used by filling up form with test suites on user request. -
initialize
@RequestMapping(value="/initialize", method=POST) public String initialize(org.springframework.web.servlet.mvc.support.RedirectAttributes model) Initializes test system. After initialization redirect to index page is triggered. -
runTestsByFilter
@RequestMapping(value="/run/filter", method=GET) public String runTestsByFilter(org.springframework.ui.Model model, @ModelAttribute("testFilter") TestFilterData testFilterData) Executes all tests from *filter* aware form. -
runTestsByTestSuites
@RequestMapping(value="/run/testsuites", method=GET) public String runTestsByTestSuites(org.springframework.ui.Model model, @ModelAttribute("testSuitesData") TestSuitesData testSuitesData) Executes all tests from test suites aware form. -
runTestsByTestCases
@RequestMapping(value="/run/testscases", method=GET) public String runTestsByTestCases(org.springframework.ui.Model model, @ModelAttribute("testCaseData") SingleTestCaseData testCaseData) -
runTestsCases
@RequestMapping(value="/run/suites", method=GET) public org.springframework.http.HttpEntity<byte[]> runTestsCases(javax.servlet.http.HttpServletRequest request) Executes tests for test suites passed in parameter *names*. This parameter is required to run this method successfully.- Returns:
- report of test execution in xml form
-
runAllTests
@RequestMapping(value="/run/all", method=GET) public org.springframework.http.HttpEntity<byte[]> runAllTests(javax.servlet.http.HttpServletRequest request) Executes all tests in current extensions set. If parameter *extensions* is passed with list of comma separated extension names tests are narrowed to only these extensions.- Returns:
- report of test execution in xml form
-
runIntegrationTests
@RequestMapping(value="/run/integration", method=GET) public org.springframework.http.HttpEntity<byte[]> runIntegrationTests(javax.servlet.http.HttpServletRequest request) Executes integration tests in current extensions set. If parameter *extensions* is passed with list of comma separated extension names tests are narrowed to only these extensions.- Returns:
- report of test execution in xml form
-
runUnitTests
@RequestMapping(value="/run/unit", method=GET) public org.springframework.http.HttpEntity<byte[]> runUnitTests(javax.servlet.http.HttpServletRequest request) Executes unit tests in current extensions set. If parameter *extensions* is passed with list of comma separated extension names tests are narrowed to only these extensions.- Returns:
- report of test execution in xml form
-
runDemoTests
@RequestMapping(value="/run/demo", method=GET) public org.springframework.http.HttpEntity<byte[]> runDemoTests(javax.servlet.http.HttpServletRequest request) Executes demo tests in current extensions set. If parameter *extensions* is passed with list of comma separated extension names tests are narrowed to only these extensions.- Returns:
- report of test execution in xml form
-
runPerformanceTests
@RequestMapping(value="/run/performance", method=GET) public org.springframework.http.HttpEntity<byte[]> runPerformanceTests(javax.servlet.http.HttpServletRequest request) Executes performance tests in current extensions set. If parameter *extensions* is passed with list of comma separated extension names tests are narrowed to only these extensions.- Returns:
- report of test execution in xml form
-
runManualTests
@RequestMapping(value="/run/manual", method=GET) public org.springframework.http.HttpEntity<byte[]> runManualTests(javax.servlet.http.HttpServletRequest request) Executes manual tests in current extensions set. If parameter *extensions* is passed with list of comma separated extension names tests are narrowed to only these extensions.- Returns:
- report of test execution in xml form
-
bindTestFilterFormEditors
@InitBinder({"testFilter","testSuitesData"}) public void bindTestFilterFormEditors(org.springframework.web.bind.WebDataBinder binder) -
bindTestSuiteFormEditors
@InitBinder("testSuite") public void bindTestSuiteFormEditors(org.springframework.web.bind.WebDataBinder binder) -
handleExceptions
@ExceptionHandler({TestExecutionFailed.class,java.lang.IllegalArgumentException.class,org.springframework.validation.BindException.class}) public org.springframework.web.servlet.ModelAndView handleExceptions(Exception exception) -
isTestSystemInitialized
@ModelAttribute("testSystemInitialized") public boolean isTestSystemInitialized()
-