Scott
Scott

Reputation: 63

How to Use AI to analyse test execution output (SQL output) to design a regression suite?

We currently run SQL reports to extract test execution output so that we can review how successful a test has been and then make an educated guess of which tests to add to our regression suites.

However this is time consuming as it requires someone to go through all the data and make certain assumptions.

I've been tasked with looking into the possibility of using artificial intelligence to sift through the data instead and would like to know if anyone has tried this and how they implemented.

Upvotes: 0

Views: 106

Answers (1)

Piotr Kamoda
Piotr Kamoda

Reputation: 1006

I'm not sure if this will do, but you can use out-of-the-box Python's scikit-learn

It is as simple as:

from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.neural_network import MLPClassifier
from sklearn.pipeline import Pipeline
import pandas as pd
####DATA PREP##
data = pd.read_csv('filepath')
#Forgot the target xD
# target = pd.read_csv('target_data_filepath')
target = data.target #If target is in data
other_data = pd.read_csv('filepath_other')
###MAKE MODEL##
tfidf_vect = TfidfVectorizer()
mpl_class = MLPClassifier()
pipe = Pipeline([('Tfidf Vectorizer', tfidf_vect),('MLP Classifier', mlp_class)]
pipe.fit(data, target) #remove target from data beforehand if applies
####PREDICT###
pipe.predict(other_data)

data is your text in separate entries, whole output per a single record

target is what you found beforehand, wether it should be included somewhere or not

other_data is what you want to test

But beware that above is just a mockup and I don't guarantee that I had all method names correct. For reading just follow scikit-learn's doku, quite expensive but extensive books like Building Machine Learning Systems with Python on Packt and lots of lots of other free blogs like this machinelearningmastery.com

Upvotes: 0

Related Questions