Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Can SilkTest be used for Data Mining?

Can SilkTest be used for Data Mining?

Data Mining is the process of searching through large amounts of data to discover trends within the data or links between data values that may correlate and pose useful for other purposes.

For example:
 

  • The data in the “age” field of a database may correlate with the data in the “Income” field. This could suggest that there is a link between age and income – data mining is used to discover such links within data.
  • Below is a sample function for datamining in the above situation

[-] testcase one () appstate none
[ ] LIST OF INT liSalary = GetSalariesFromDB()
[ ] LIST OF INT liAge =GetAgesFromDB()
[ ] DataMine(liSalary, liAge)
[ ]
[-] DataMine (LIST OF INT liSalary, LIST OF INT liAge)
[ ]
[ ] // declare all variables
[ ] int iCount = 0
[ ] int iSalLow = liSalary[1]
[ ] int iSalHigh = liSalary[1]
[ ] int iSalAverage = 0
[ ] int iAgeAveage = 0
[ ] int iAgeLow = liAge[1]
[ ] int iAgeHigh= liAge[1]
[ ] int i
[ ]
[ ] int positive = 0
[ ] int negative = 0
[ ] int bothbelow = 0
[ ] int bothabove = 0
[ ] int lowagehighwage = 0
[ ] int highagelowwage = 0
[ ]
[ ] //Check that both lists are equal - if not then exit as lists should match
[-] if (ListCount(liSalary) == ListCount(liAge))
[ ]
[ ] // Get the highest, Get the lowest, Get the average
[-] for each iCount in liSalary
[-] if iCount <>
[ ] iSalLow = iCount
[ ]
[-] if iCount >iSalHigh
[ ] iSalHigh = iCount
[ ]
[ ] iSalAverage = iSalAverage + iCount
[ ]
[ ] iSalAverage = iSalAverage / ListCount(liSalary)
[ ]
[-] for each iCount in liAge
[-] if iCount <>
[ ] iAgeLow = iCount
[ ]
[-] if iCount >iAgeHigh
[ ] iAgeHigh = iCount
[ ]
[ ] iAgeAveage = iAgeAveage + iCount
[ ]
[ ]
[ ] iAgeAveage = iAgeAveage / ListCount(liAge)
[ ]
[-] for (i=1; i
[ ] // both below average
[+] if(liSalary
[ ] bothbelow++
[ ]
[ ] // both above average
[+] if(liSalary > iSalAverage && liAge > iAgeAveage )
[ ] bothabove ++
[ ]
[ ] // below age - above wage
[+] if(liSalary > iSalAverage && liAge
[ ] lowagehighwage ++
[ ]
[ ] // above age - below wage
[-] if(liSalary iAgeAveage )
[ ] highagelowwage ++
[ ]
[ ]
[ ] Print("The Highest Sal: ", iSalHigh)
[ ] Print("The Lowest Sal: ", iSalLow)
[ ] Print("The Oldest: ", iAgeHigh)
[ ] Print("The Youngest: ", iAgeLow)
[ ] Print("The Aveage Age: ", iAgeAveage)
[ ] Print("The Average Sal: ", iSalAverage)
[ ]
[ ] Print("number BELOW average wage AND age: ",bothbelow)
[ ] Print("number ABOVE average wage AND age", bothabove)
[ ] Print("number BELOW average AGE but ABOVE average WAGE", lowagehighwage)
[ ] Print("number ABOVE average AGE but BELOW average WAGE", highagelowwage)
[ ]
[ ] // if age and salary correlate in more than half of cases
[-] if ((bothbelow + bothabove) > (ListCount(liAge)/2))
[ ] Print("Salary and age have a positive correlation in most (", bothbelow + bothabove, " out of ", ListCount(liAge), ") cases!")
[-] else
[ ] Print("There is no direct correlation between salary in age in this case!")
[ ]
[-] else
[ ] // the lists are not equal and so fair comparisons cannot be made
[ ] Print("The lists are not equal - therefore not a valid set to data-mine")


SilkTest, although primarily a functional testing tool, could be used for data mining purposes - as long as it can connect to the data source and extract information from it. Once the information is passed from the source to SilkTest – SilkTest could compare the values and search for any predefined patterns that the user wants to search for.

For a list of databases that SilkTest is supported to work with please see the SilkTest help.

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:16
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.