eval operator - Search Language Test (oxiclean)
- search test: eval operator through the UI.
comment splunk> start with '/'
open / (open the main interface)
comment Wait for server response 'completed'
waitForDispatchCompleted 5000
comment Clear search and hit report tab
type //textarea[@id='entry']
click //input[@id='entrySubmit'] (Click submit button)
comment Wait for query to load
waitForDispatchCompleted 40000
comment **** Eval Simple Case (rename functionality)****
type //textarea[@id='entry'] index=sampledata startmonthsago=12 source=http1access.log.sample | eval host_field = host
click //input[@id='entrySubmit'] (Click submit button)
comment Wait for query to load
waitForDispatchCompleted 100000
verifyText //div[@id='r0']//div[@class='metaData'] *host_field=*
comment **** Eval failure; simple case, invalid args ****
type //textarea[@id='entry'] index::_internal | eval eval
click //input[@id='entrySubmit'] (Click submit button)
comment Expect and validate error notification due to invalid args
waitForText //div[@id='msgNotificationContainer']//td[@class='ERROR'] Error*
verifyText //div[@id='msgNotificationContainer']//td[@class='ERROR'] *eval dest_key*