top operator - Search Language Test (oxiclean)
- search test: top 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 server response 'completed'
waitForDispatchCompleted 8000
comment **** top Simple Case ****
type //textarea[@id='entry'] index::_internal | top 5 processor
click //input[@id='entrySubmit'] (Click submit button)
comment Wait for server response 'completed'
waitForDispatchCompleted 10000
comment Validate columns processor, count, percent
verifyText //table[@id='reportTable']//th[@id='rpc1']//a[@class='reportColumnLabel'] processor
verifyText //table[@id='reportTable']//th[@id='rpc2']//a[@class='reportColumnLabel'] count
verifyText //table[@id='reportTable']//th[@id='rpc3']//a[@class='reportColumnLabel'] percent
comment Validate chart present 'FlashChartLoaded'
verifyFlashChartLoaded
comment splunk> start with '/'
open / (open the main interface)
comment Wait for server response 'completed'
waitForDispatchCompleted 5000
comment Change time line to 'All Time'
select //select[@id='timelineValues'] value=ALL_TIME
comment Clear search and hit report tab
type //textarea[@id='entry']
click //input[@id='entrySubmit'] (Click submit button)
comment Wait for server response 'completed'
waitForDispatchCompleted 10000
comment **** top: apache clientip Case ****
type //textarea[@id='entry'] index::sampledata sourcetype::access_combined | top 12 clientip
click //input[@id='entrySubmit'] (Click submit button)
comment Wait for server response 'completed'
waitForDispatchCompleted 10000
comment Validate columns processor, count, percent
verifyText //table[@id='reportTable']//th[@id='rpc1']//a[@class='reportColumnLabel'] clientip
verifyText //table[@id='reportTable']//th[@id='rpc2']//a[@class='reportColumnLabel'] count
verifyText //table[@id='reportTable']//th[@id='rpc3']//a[@class='reportColumnLabel'] percent
comment Validate chart present 'FlashChartLoaded'
verifyFlashChartLoaded
comment **** top failure; simple case, no args ****
type //textarea[@id='entry'] index::_internal | top
click //input[@id='entrySubmit'] (Click submit button)
comment Expect and validate error notification due to missing args
waitForText //div[@id='msgNotificationContainer']//td[@class='ERROR'] Error*
verifyText //div[@id='msgNotificationContainer']//td[@class='ERROR'] *No fields*