Permalink
Browse files

Merged testing

  • Loading branch information...
OLAT Team
OLAT Team committed Feb 21, 2018
2 parents 2a4d541 + 8463602 commit 0988b17e71e85dc3944cb1110ea5f03b056e1e8d
Showing with 33,460 additions and 327 deletions.
  1. +31 −0 ...n-adobeconnect/src/main/java/ch/uzh/extension/adobeconnect/client/LmsuzhSwitchInteractConfig.java
  2. +4 −0 lmsuzh-extension-adobeconnect/src/main/resources/switchinteract.properties
  3. +4 −0 lmsuzh-extension-adobeconnect/src/main/resources/switchinteract.properties.template
  4. +31 −3 ...sion-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/AdministratorMacros.java
  5. +96 −48 ...h-extension-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/AuthorMacros.java
  6. +47 −1 ...h-extension-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/CourseMacros.java
  7. +47 −12 ...zh-extension-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/GroupMacros.java
  8. +8 −0 lmsuzh-extension-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/QtiMacros.java
  9. +96 −0 ...zh-extension-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/StartMacros.java
  10. +36 −7 ...on-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/core/AuthorCoreMacros.java
  11. +1 −1 ...ctionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/core/CampusCourseCoreMacros.java
  12. +7 −7 ...on-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/core/CourseCoreMarcos.java
  13. +24 −2 ...ion-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/core/GroupCoreMacros.java
  14. +11 −0 ...nsion-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/core/QtiCoreMacros.java
  15. +77 −0 ...extension-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/utils/LogTexts.java
  16. +9 −1 lmsuzh-extension-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/utils/Util.java
  17. +22 −4 ...-extension-functionaltest/src/main/java/ch/uzh/extension/functionaltest/macros/utils/Xpathes.java
  18. +1 −1 ...ion-functionaltest/src/test/java/ch/uzh/extension/functionaltest/basic/BasicTestExportCourse.java
  19. +130 −0 ...ion-functionaltest/src/test/java/ch/uzh/extension/functionaltest/basic/BasicTestTranslations.java
  20. +2 −2 ...est/src/test/java/ch/uzh/extension/functionaltest/properties/BasicTestExportCourseProperties.java
  21. +11 −0 ...est/src/test/java/ch/uzh/extension/functionaltest/properties/BasicTestTranslationsProperties.java
  22. +1 −0 ...src/test/java/ch/uzh/extension/functionaltest/properties/RegressionTestFolderItemsProperties.java
  23. +1 −0 .../src/test/java/ch/uzh/extension/functionaltest/properties/RegressionTestInsertLinkProperties.java
  24. +32 −31 ...est/src/test/java/ch/uzh/extension/functionaltest/properties/SmokeTestCampuscourseProperties.java
  25. +10 −0 ...ionaltest/src/test/java/ch/uzh/extension/functionaltest/regression/RegressionTestFolderItems.java
  26. +14 −1 ...tionaltest/src/test/java/ch/uzh/extension/functionaltest/regression/RegressionTestInsertLink.java
  27. +7 −2 ...ctionaltest/src/test/java/ch/uzh/extension/functionaltest/smoke/SmokeTestCampuscoursePacket1.java
  28. +9 −0 ...ctionaltest/src/test/java/ch/uzh/extension/functionaltest/smoke/SmokeTestCampuscoursePacket2.java
  29. +5 −0 ...ctionaltest/src/test/java/ch/uzh/extension/functionaltest/smoke/SmokeTestCampuscoursePacket3.java
  30. +38 −0 lmsuzh-extension-functionaltest/src/test/java/ch/uzh/extension/functionaltest/testutil/TestUtil.java
  31. +12 −13 ...h-extension-functionaltest/src/test/resources/sapFiles/ZCM_LEHRE===ZCM_ED========_CUS&CURRENT.csv
  32. +12 −12 lmsuzh-extension-functionaltest/src/test/resources/sapFiles/ZCM_LEHRE===ZCM_ED========_CUS&NEXT.csv
  33. +18 −53 ...tension-loadtest/src/test/java/ch/uzh/extension/loadtest/PrepareBasicSemesterStartJMeterTest.java
  34. +13 −0 ...st/src/test/java/ch/uzh/extension/loadtest/properties/BasicSemesterStartJmeterTestProperties.java
  35. +4,131 −20 lmsuzh-extension-loadtest/src/test/jmeter/smoke/BasicPerformanceSemesterStart.jmx
  36. +90 −90 lmsuzh-extension-loadtest/src/test/jmeter/smoke/courses.csv
  37. +4,951 −0 lmsuzh-extension-loadtest/src/test/jmeter/smoke/enrolment.csv
  38. +100 −0 lmsuzh-extension-loadtest/src/test/jmeter/smoke/enrolmentcourses.csv
  39. +28 −0 lmsuzh-extension-loadtest/src/test/jmeter/smoke/essayTexts.csv
  40. +3,000 −0 lmsuzh-extension-loadtest/src/test/jmeter/smoke/gapTexts.csv
  41. +5,001 −0 lmsuzh-extension-loadtest/src/test/jmeter/smoke/task.csv
  42. +100 −0 lmsuzh-extension-loadtest/src/test/jmeter/smoke/taskcourses.csv
  43. +5,001 −0 lmsuzh-extension-loadtest/src/test/jmeter/smoke/test.csv
  44. +100 −0 lmsuzh-extension-loadtest/src/test/jmeter/smoke/testcourses.csv
  45. +50 −0 lmsuzh-extension-loadtest/src/test/resources/import/ImportAuthors.csv
  46. +5,000 −0 lmsuzh-extension-loadtest/src/test/resources/import/ImportTaskUsers.csv
  47. +5,000 −0 lmsuzh-extension-loadtest/src/test/resources/import/ImportTestUsers.csv
  48. BIN lmsuzh-extension-loadtest/src/test/resources/inputs/Jmeter_Performance_Kurs.zip
  49. +5 −0 lmsuzh-extension-loadtest/src/test/resources/properties/OlatTestAutomation.properties
  50. +36 −4 lmsuzh-extension-loadtest/src/test/resources/smoke/BasicPerformanceSemesterStart.properties
  51. +0 −12 lmsuzh-extension-loadtest/src/test/resources/smoke/BasicSemesterStartJmeterTest.properties
@@ -0,0 +1,31 @@
package ch.uzh.extension.adobeconnect.client;
import ch.uzh.extension.tool.LmsuzhClasspath;
public class LmsuzhSwitchInteractConfig {
private static final String SWITCHINTERACT_PROPERTIES = "switchinteract.properties";
public static String getDefaultDomain() {
return getProperty(SWITCHINTERACT_PROPERTIES, "defaultDomain", "");
}
public static String getTarget() {
return getProperty(SWITCHINTERACT_PROPERTIES, "target", "");
}
public static String getTechnicalUserLogin() {
return getProperty(SWITCHINTERACT_PROPERTIES, "technicalUserLogin", "");
}
public static String getTechnicalUserPassword() {
return getProperty(SWITCHINTERACT_PROPERTIES, "technicalUserPassword", "");
}
private static String getProperty(String propertyFile, String propertyName, String defaultValue) {
String value = LmsuzhClasspath.getValue(propertyName, propertyFile);
return value == null ? defaultValue : value;
}
}
@@ -0,0 +1,4 @@
defaultDomain=collab.switch.ch
target=https://collab.switch.ch/api/xml
technicalUserLogin=switchinteract@zi.uzh.ch
technicalUserPassword=Un1c0rnzAttack!
@@ -0,0 +1,4 @@
defaultDomain=collab.switch.ch
target=https://collab.switch.ch/api/xml
technicalUserLogin=
technicalUserPassword=
@@ -27,7 +27,24 @@
private final AuthorCoreMacros authorCoreMacros = new AuthorCoreMacros();
private final CourseCoreMarcos courseCoreMarcos = new CourseCoreMarcos();
/**
/**
*Select User management
*/
public void selectUserManagement(WebDriver driver) throws Exception {
administratorCoreMacros.selectTabUserManagement(driver);
LogTexts.logSelectUserManagementTab(LOGGER, false);
}
/**
*Select Administraton
*/
public void selectAdministration(WebDriver driver) throws Exception {
administratorCoreMacros.selectTabAdministration(driver);
LogTexts.logSelectAdministrationTab(LOGGER, false);
}
/**
*Create new user without role
*/
public void createOlatUser(WebDriver driver, String username, String firstname, String lastname, String email, String password) throws Exception {
@@ -147,7 +164,7 @@ public void setInstitutionByUser(WebDriver driver, String username, String insti
*Set camus course template
*/
public void setCampusCourseTemplate(WebDriver driver, int nummer, Lang language) throws Exception {
authorCoreMacros.selectTabAutoring(driver);
authorCoreMacros.selectTabAuthoring(driver);
courseCoreMarcos.selectLernresourceInCourses(driver, nummer, CourseGrid.OPENCOURSEINFO);
String repoID = administratorCoreMacros.getRepositoryIdFromCourseInfo(driver);
administratorCoreMacros.selectTabAdministration(driver);
@@ -361,7 +378,7 @@ public void editInfoMessage(WebDriver driver, String message) throws Exception {
}
/**
*delete info message
*Delete info message
*/
public void deleteInfoMessage(WebDriver driver) throws Exception {
administratorCoreMacros.selectTabAdministration(driver);
@@ -370,4 +387,15 @@ public void deleteInfoMessage(WebDriver driver) throws Exception {
Util.selectXpath(driver, Xpathes.XPATH_BUTTON_DEFAULT_2);
Util.selectXpath(driver, Xpathes.XPATH_SYSTEM_TREEITEM_IN_ADMINISTRATION);
}
/**
*Find missing translations
*/
public void findMissingTranslations(WebDriver driver) throws Exception {
if (Util.checkTranslations(driver) != 0) {
LogTexts.logTranslationMissing(LOGGER, true);
} else {
LogTexts.logTranslationMissing(LOGGER, false);
}
}
}

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -25,6 +25,52 @@
private final CourseCoreMarcos courseCoreMacros = new CourseCoreMarcos();
/**
*Select Favourites in Courses
*/
public void selectFavouritesInCourses(WebDriver driver) throws Exception {
courseCoreMacros.selectTabCourse(driver);
courseCoreMacros.selectMenuTab(driver, CourseCoreMarcos.TabMenuInCourse.FAVOURITES);
LogTexts.logSelectFavourites(LOGGER, false);
}
/**
*Select My courses in Courses
*/
public void selectMyCourses(WebDriver driver) throws Exception {
courseCoreMacros.selectTabCourse(driver);
courseCoreMacros.selectMenuTab(driver, CourseCoreMarcos.TabMenuInCourse.MYCOURSES);
LogTexts.logSelectMyCourses(LOGGER, false);
}
/**
*Select Finished in Courses
*/
public void selectFinished(WebDriver driver) throws Exception {
courseCoreMacros.selectTabCourse(driver);
courseCoreMacros.selectMenuTab(driver, CourseCoreMarcos.TabMenuInCourse.FINISHED);
LogTexts.logSelectFinished(LOGGER, false);
}
/**
*Select Catalog in Courses
*/
public void selectCatalog(WebDriver driver) throws Exception {
courseCoreMacros.selectTabCourse(driver);
courseCoreMacros.selectMenuTab(driver, CourseCoreMarcos.TabMenuInCourse.CATALOG);
LogTexts.logSelectCatalog(LOGGER, false);
}
/**
*Select Search in Courses
*/
public void selectSearchInCourses(WebDriver driver) throws Exception {
courseCoreMacros.selectTabCourse(driver);
courseCoreMacros.selectMenuTab(driver, CourseCoreMarcos.TabMenuInCourse.SEARCHFORM);
LogTexts.logSelectSearch(LOGGER, false);
}
/**
*Show all courses
*/
public void showAllCourses(WebDriver driver) throws Exception {
@@ -218,7 +264,7 @@ public void getStateOfCourse(WebDriver driver, String title, Boolean inprogress)
public boolean advencedSearchFromCourses(WebDriver driver, Boolean resultat, String titleoflernresource, String... author) throws Exception {
courseCoreMacros.selectTabCourse(driver);
courseCoreMacros.selectMenuTab(driver, CourseCoreMarcos.TabMenuInCourse.FAVOURITES);
courseCoreMacros.selectMenuTab(driver, CourseCoreMarcos.TabMenuInCourse.SEARCH);
courseCoreMacros.selectMenuTab(driver, CourseCoreMarcos.TabMenuInCourse.SEARCHFORM);
Util.selectXpath(driver, Xpathes.XPATH_ADVANCED_SEARCH_BUTTON_IN_COURCE);
Util.setInputsField(driver, Xpathes.XPATH_TITLE_INPUT_IN_ADVANCED_SEARCH, titleoflernresource);
@@ -3,7 +3,6 @@
import ch.uzh.extension.functionaltest.macros.core.GroupCoreMacros;
import ch.uzh.extension.functionaltest.macros.enums.TextColour;
import ch.uzh.extension.functionaltest.macros.enums.TextFormat;
import ch.uzh.extension.functionaltest.macros.enums.ToolsMenu;
import ch.uzh.extension.functionaltest.macros.utils.LogTexts;
import ch.uzh.extension.functionaltest.macros.utils.Util;
import ch.uzh.extension.functionaltest.macros.utils.Xpathes;
@@ -20,7 +19,7 @@
public class GroupMacros extends StartMacros {
private final static Logger LOGGER = LoggerFactory.getLogger(GroupMacros.class);
private final static GroupCoreMacros groupcoremacros = new GroupCoreMacros();
private final static GroupCoreMacros groupCoreMacros = new GroupCoreMacros();
public enum GroupTab {
DESCRIPTION (1),
@@ -84,16 +83,58 @@ public String getdisplaymember() {
public String getdisplaymemberlabel() {
return this.displaymemberlabel;
}
}
/**
*Select Groups tab
*/
private void selectTabGroups(WebDriver driver) throws Exception {
Util.openMainTab(driver, Xpathes.XPATH_GROUPS_TAB);
}
/**
*Select Bookmark in Groups
*/
public void selectBookmark(WebDriver driver) throws Exception {
selectTabGroups(driver);
groupCoreMacros.selectMenuTab(driver, GroupCoreMacros.TabMenuInGroup.BOOKMARK);
LogTexts.logSelectBookmark(LOGGER, false);
}
/**
*Select My groups in Groups
*/
public void selectMyGroups(WebDriver driver) throws Exception {
selectTabGroups(driver);
groupCoreMacros.selectMenuTab(driver, GroupCoreMacros.TabMenuInGroup.MYGROUPS);
LogTexts.logSelectMyGroups(LOGGER, false);
}
/**
*Select Published groups in Groups
*/
public void selectPublishedGroups(WebDriver driver) throws Exception {
selectTabGroups(driver);
groupCoreMacros.selectMenuTab(driver, GroupCoreMacros.TabMenuInGroup.PUBLISHEDGROUPS);
LogTexts.logSelectPublishedGroups(LOGGER, false);
}
/**
*Select Group management in Groups
*/
public void selectGroupManagement(WebDriver driver) throws Exception {
selectTabGroups(driver);
groupCoreMacros.selectMenuTab(driver, GroupCoreMacros.TabMenuInGroup.GROUPMANAGEMENT);
LogTexts.logSelectGroupManagement(LOGGER, false);
}
/**
*Create group
*/
public void createGroup(WebDriver driver, String groupname, String maxparticipants, boolean waitinglist, boolean automoving, String... description) throws Exception {
selectTabGroups(driver);
Util.selectXpath(driver, Xpathes.XPATH_CREATE_GROUP_BUTTON_IN_GROUP);
groupcoremacros.createGroupOnModal(driver, groupname, maxparticipants, waitinglist, automoving, description);
groupCoreMacros.createGroupOnModal(driver, groupname, maxparticipants, waitinglist, automoving, description);
}
@@ -146,13 +187,6 @@ public int selectTreeNodeByShortTitle(WebDriver driver, String title) throws Exc
return 0;
}
/**
*Select Groups tab
*/
private void selectTabGroups(WebDriver driver) throws Exception {
Util.openMainTab(driver, Xpathes.XPATH_GROUPS_TAB);
}
/**
*Select configuration tab in groups
*/
@@ -177,7 +211,7 @@ public void selectGroupInGroups(WebDriver driver, String title) throws Exception
/**
*Add group member
*/
private void addMember(WebDriver driver, String username, Boolean... groupcoach) throws Exception {
public void addMember(WebDriver driver, String username, Boolean... groupcoach) throws Exception {
Util.selectXpath(driver, Xpathes.XPATH_ADD_MEMBER_BUTTON_IN_GROUP);
Util.setInputsField(driver, Xpathes.XPATH_ADD_MEMBER_NAME_INPUT_ON_MODAL + "//input", username);
Util.selectXpath(driver, Xpathes.XPATH_SEARCH_BUTTON_ON_ADD_MEMBER_MODAL_WORKAROUND);
@@ -350,6 +384,7 @@ public void getNodeInGroup(WebDriver driver, String tool, Boolean isdisplay) thr
LogTexts.logFindToolToGroup(LOGGER, true, tool);
}
}
Thread.sleep(1000);
}
/**
@@ -28,6 +28,14 @@
private final CourseCoreMarcos courseCoreMacros = new CourseCoreMarcos();
/**
*Select Question bank
*/
public void selectQuestionBank(WebDriver driver) throws Exception {
qtiCoreMacros.selectTabQuestionBank(driver);
LogTexts.logSelectQuestionBankTab(LOGGER, false);
}
/**
* Create test content
*/
public void createTestContent(WebDriver driver, String t_name) throws Exception {
@@ -462,6 +462,102 @@ public void checkAdministratorView(WebDriver driver) throws Exception {
}
}
/**
*Check Roles and delegations in user profile
*/
public void checkRolesAndDelegationsInProfile(WebDriver driver, boolean isexist) throws Exception{
if (Util.isElementPresent(driver, Xpathes.XPATH_NAVIGATION_MENU_CONTAINER)) {
Util.selectXpath(driver, Xpathes.XPATH_NAVIGATION_MENU_CONTAINER);
}
Util.selectXpath(driver, Xpathes.XPATH_PROFILE, true);
if (isexist) {
if (Util.isElementPresent(driver, Xpathes.XPATH_ROLES_DELEGATIONS_IN_PROFILE, 2)) {
LogTexts.logRolesAndDelegations(LOGGER, false);
} else {
LogTexts.logRolesAndDelegations(LOGGER, true);
}
}
if (!isexist) {
if (Util.isElementPresent(driver, Xpathes.XPATH_ROLES_DELEGATIONS_IN_PROFILE, 2)) {
LogTexts.logRolesAndDelegations(LOGGER, true);
} else {
LogTexts.logRolesAndDelegations(LOGGER, false);
}
}
}
/**
*Check role
*/
public void checkRoleInProfile(WebDriver driver, String role) throws Exception{
if (Util.isElementPresent(driver, Xpathes.XPATH_NAVIGATION_MENU_CONTAINER)) {
Util.selectXpath(driver, Xpathes.XPATH_NAVIGATION_MENU_CONTAINER);
}
Util.selectXpath(driver, Xpathes.XPATH_PROFILE, true);
Util.selectXpath(driver, Xpathes.XPATH_ROLES_DELEGATIONS_IN_PROFILE);
if (Util.isElementPresent(driver, "//div[@class='o_segments_content']//ul/li[contains(text(), '" + role + "')]",2)) {
LogTexts.logCheckRole(LOGGER, false, role);
} else {
LogTexts.logCheckRole(LOGGER, true, role);
}
}
/**
*Check delegator
*/
public void findDelegatorInProfile(WebDriver driver, String delegator, String user, boolean isdelegation) throws Exception{
if (Util.isElementPresent(driver, Xpathes.XPATH_NAVIGATION_MENU_CONTAINER)) {
Util.selectXpath(driver, Xpathes.XPATH_NAVIGATION_MENU_CONTAINER);
}
Util.selectXpath(driver, Xpathes.XPATH_PROFILE, true);
Util.selectXpath(driver, Xpathes.XPATH_ROLES_DELEGATIONS_IN_PROFILE);
List<WebElement> del;
del = Util.searchItems(driver, Xpathes.XPATH_TABLE_DELEGATOR + "/tbody//td/a[contains(text(), '" + delegator + "')]", 2);
if (isdelegation) {
if (del.size() > 0) {
LogTexts.logFindDelegation(LOGGER, false, delegator, user);
} else {
LogTexts.logFindDelegation(LOGGER, true, delegator, user);
}
} else {
if (del.size() > 0) {
LogTexts.logDelegationNotFound(LOGGER, true, delegator, user);
} else {
LogTexts.logDelegationNotFound(LOGGER, false, delegator, user);
}
}
}
/**
*Check delegatee
*/
public void findDelegateeInProfile(WebDriver driver, String delegatee, String user, boolean isdelegation) throws Exception{
if (Util.isElementPresent(driver, Xpathes.XPATH_NAVIGATION_MENU_CONTAINER)) {
Util.selectXpath(driver, Xpathes.XPATH_NAVIGATION_MENU_CONTAINER);
}
Util.selectXpath(driver, Xpathes.XPATH_PROFILE, true);
Util.selectXpath(driver, Xpathes.XPATH_ROLES_DELEGATIONS_IN_PROFILE);
List<WebElement> del;
del = Util.searchItems(driver, Xpathes.XPATH_TABLE_DELEGATEE + "/tbody//td/a[contains(text(), '" + delegatee + "')]", 2);
if (isdelegation) {
if (del.size() > 0) {
LogTexts.logFindDelegatee(LOGGER, false, delegatee, user);
} else {
LogTexts.logFindDelegatee(LOGGER, true, delegatee, user);
}
} else {
if (del.size() > 0) {
LogTexts.logDelegateeNotFound(LOGGER, true, delegatee, user);
} else {
LogTexts.logDelegateeNotFound(LOGGER, false, delegatee, user);
}
}
}
/**
*Logout
*/
Oops, something went wrong.

0 comments on commit 0988b17

Please sign in to comment.