diff --git a/README.md b/README.md index e30ddf2..aa7c23f 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,11 @@ Consist of several modules: 4. Administrator - configure different parameters ## [DASHBOARD] +(!) New feature +Upload CSV files with your test results data and get immediately report and compare +it with previous tests: +![alt tag](https://github.com/v0devil/jltom/blob/master/pics/upload.png) + Get tests overview ![alt tag](https://github.com/v0devil/jltom/blob/master/pics/dashboard.png) diff --git a/analyzer/forms.py b/analyzer/forms.py new file mode 100644 index 0000000..9de29b6 --- /dev/null +++ b/analyzer/forms.py @@ -0,0 +1,7 @@ +from .models import TestResultFile +from django import forms + +class TestResultFileUploadForm(forms.ModelForm): + class Meta: + model = TestResultFile + fields = ('file', ) \ No newline at end of file diff --git a/analyzer/models.py b/analyzer/models.py index 7a7a0fd..461cc92 100644 --- a/analyzer/models.py +++ b/analyzer/models.py @@ -135,10 +135,10 @@ class Meta: ] class TestResultFile(models.Model): - project = models.ForeignKey(Project, on_delete=models.CASCADE, default=1) - test = models.ForeignKey(Test) + #project = models.ForeignKey(Project, on_delete=models.CASCADE, default=1) + #test = models.ForeignKey(Test) file = models.FileField(upload_to='test_result_files/') - uploaded_at = models.DateTimeField(auto_now_add=True) + #uploaded_at = models.DateTimeField(auto_now_add=True) class Meta: db_table = 'test_result_file' diff --git a/analyzer/templates/upload/success.html b/analyzer/templates/upload/success.html new file mode 100644 index 0000000..6e533a3 --- /dev/null +++ b/analyzer/templates/upload/success.html @@ -0,0 +1,6 @@ +{{ result }} +Test {{ test_name }} was added for project {{ project_id }} + +Number of lines: {{ num_lines }} + + diff --git a/analyzer/templates/upload/test_result_file.html b/analyzer/templates/upload/test_result_file.html new file mode 100644 index 0000000..935e568 --- /dev/null +++ b/analyzer/templates/upload/test_result_file.html @@ -0,0 +1,66 @@ +
+ ++ Currently supports only CSV-result files. + CSV result file mast have 5 mandatory fields: + timestamp, response_time, url, responseCode, success. + Example: + 1515027139558,310,Action_name,200,true + + If you file have different amount of columns or different order, place + this data to field in a bottom. Timestamp is mandatory and must be always on the first place + +
+