Class JunitController
- java.lang.Object
-
- de.hybris.platform.testweb.controllers.JunitController
-
@Controller public class JunitController extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classJunitController.TestExecutionFailed
-
Constructor Summary
Constructors Constructor Description JunitController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindTestFilterFormEditors(org.springframework.web.bind.WebDataBinder binder)voidbindTestSuiteFormEditors(org.springframework.web.bind.WebDataBinder binder)org.springframework.web.servlet.ModelAndViewhandleExceptions(java.lang.Exception exception)java.lang.Stringindex(org.springframework.ui.Model model, TestFilterData testFilterData, TestSuitesData testSuitesData)Renders page with forms to execute tests.voidinit()java.lang.Stringinitialize(org.springframework.web.servlet.mvc.support.RedirectAttributes model)Initializes test system.booleanisTestSystemInitialized()java.util.List<java.lang.String>loadTestCases(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.java.lang.StringrunTestsByFilter(org.springframework.ui.Model model, TestFilterData testFilterData)Executes all tests from *filter* aware form.java.lang.StringrunTestsByTestCases(org.springframework.ui.Model model, SingleTestCaseData testCaseData)java.lang.StringrunTestsByTestSuites(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.
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
index
@RequestMapping("/") public java.lang.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 java.util.List<java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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(java.lang.Exception exception)
-
isTestSystemInitialized
@ModelAttribute("testSystemInitialized") public boolean isTestSystemInitialized()
-
-