public class ShareSearchScenario extends AbstractShareScenario
TestFileService is used to find a file searchterms.txt,
which is then read and random lines used (a search term per line). If the file does not exist, some
default search strings are chosen.| Modifier and Type | Field and Description |
|---|---|
static String[] |
DEFAULT_SEARCH_STRINGS |
static String |
DEFAULT_SEARCH_TERMS_FILENAME |
static String |
EVENT_NAME_SEARCH |
String[] |
searchStrings |
| Constructor and Description |
|---|
ShareSearchScenario(ShareScenarioRegistry registry,
double weight) |
| Modifier and Type | Method and Description |
|---|---|
List<org.alfresco.bm.event.Event> |
getNextEvents(org.alfresco.bm.event.Event event,
ShareEventData eventData,
ShareSoakData soakData,
long nextEventTime)
If the browser is not on the user dashboard then an event is fired to navigate to
the user dashboard.
|
static String |
getRandomSearchString(String[] searchStrings)
Choose a random string from the search strings provided
|
static String[] |
getSearchStrings(org.alfresco.bm.file.TestFileService testFileService,
String searchTermsFilename)
Static helper to find and extract a search term from the given file
|
void |
setEventNameSearch(String eventNameSearch)
Override the
default name for the search event |
void |
setSearchTermsFilename(String searchTermsFilename)
Override the
default test filename containing search
terms (one on each line). |
void |
setTestFileService(org.alfresco.bm.file.TestFileService testFileService)
Optionally set the test file service to locate the
setSearchTermsFilename(String)
file containing search terms to use. |
afterPropertiesSet, setBeanName, setScenarioNamepublic static final String[] DEFAULT_SEARCH_STRINGS
public static final String DEFAULT_SEARCH_TERMS_FILENAME
public static final String EVENT_NAME_SEARCH
public String[] searchStrings
public ShareSearchScenario(ShareScenarioRegistry registry, double weight)
registry - registry with which this instance will be registeredweight - the weight relative to other scenarios registered in the registrypublic void setTestFileService(org.alfresco.bm.file.TestFileService testFileService)
setSearchTermsFilename(String)
file containing search terms to use. If this property is set, the file must be accessible.testFileService - service providing remote access to test filespublic void setSearchTermsFilename(String searchTermsFilename)
default test filename containing search
terms (one on each line).searchTermsFilename - the name of the remote file in the test file listpublic void setEventNameSearch(String eventNameSearch)
default name for the search eventpublic List<org.alfresco.bm.event.Event> getNextEvents(org.alfresco.bm.event.Event event, ShareEventData eventData, ShareSoakData soakData, long nextEventTime)
event - the event that triggered this choiceeventData - Share-specific data associated with the eventsoakData - Session-specific data for the eventnextEventTime - the suggested next event time (for guidance)public static String[] getSearchStrings(org.alfresco.bm.file.TestFileService testFileService, String searchTermsFilename)
testFileService - the test filessearchTermsFilename - the name of the file to findCopyright © 2016. All rights reserved.