result-companion 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- result_companion-0.0.1/LICENSE +201 -0
- result_companion-0.0.1/PKG-INFO +216 -0
- result_companion-0.0.1/README.md +176 -0
- result_companion-0.0.1/pyproject.toml +58 -0
- result_companion-0.0.1/result_companion/__init__.py +8 -0
- result_companion-0.0.1/result_companion/core/analizers/__init__.py +0 -0
- result_companion-0.0.1/result_companion/core/analizers/common.py +58 -0
- result_companion-0.0.1/result_companion/core/analizers/factory_common.py +104 -0
- result_companion-0.0.1/result_companion/core/analizers/local/__init__.py +0 -0
- result_companion-0.0.1/result_companion/core/analizers/local/ollama_exceptions.py +10 -0
- result_companion-0.0.1/result_companion/core/analizers/local/ollama_install.py +279 -0
- result_companion-0.0.1/result_companion/core/analizers/local/ollama_runner.py +124 -0
- result_companion-0.0.1/result_companion/core/analizers/local/ollama_server_manager.py +185 -0
- result_companion-0.0.1/result_companion/core/analizers/models.py +17 -0
- result_companion-0.0.1/result_companion/core/analizers/remote/__init__.py +0 -0
- result_companion-0.0.1/result_companion/core/analizers/remote/custom_endpoint.py +0 -0
- result_companion-0.0.1/result_companion/core/analizers/remote/openai.py +0 -0
- result_companion-0.0.1/result_companion/core/chunking/chunking.py +113 -0
- result_companion-0.0.1/result_companion/core/chunking/utils.py +114 -0
- result_companion-0.0.1/result_companion/core/configs/default_config.yaml +85 -0
- result_companion-0.0.1/result_companion/core/html/__init__.py +0 -0
- result_companion-0.0.1/result_companion/core/html/html_creator.py +179 -0
- result_companion-0.0.1/result_companion/core/html/llm_injector.py +20 -0
- result_companion-0.0.1/result_companion/core/parsers/__init__.py +0 -0
- result_companion-0.0.1/result_companion/core/parsers/config.py +256 -0
- result_companion-0.0.1/result_companion/core/parsers/result_parser.py +101 -0
- result_companion-0.0.1/result_companion/core/results/__init__.py +0 -0
- result_companion-0.0.1/result_companion/core/results/visitors.py +34 -0
- result_companion-0.0.1/result_companion/core/utils/__init__.py +0 -0
- result_companion-0.0.1/result_companion/core/utils/log_levels.py +23 -0
- result_companion-0.0.1/result_companion/core/utils/logging_config.py +115 -0
- result_companion-0.0.1/result_companion/core/utils/progress.py +61 -0
- result_companion-0.0.1/result_companion/entrypoints/__init__.py +0 -0
- result_companion-0.0.1/result_companion/entrypoints/cli/__init__.py +0 -0
- result_companion-0.0.1/result_companion/entrypoints/cli/cli_app.py +266 -0
- result_companion-0.0.1/result_companion/entrypoints/run_rc.py +171 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: result-companion
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: AI-powered analysis of Robot Framework test failures - instant insights from output.xml
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: robotframework,testing,ai,llm,test-analysis,ollama,openai
|
|
8
|
+
Author: Milosz Trojanowski
|
|
9
|
+
Author-email: mil.troj@gmail.com
|
|
10
|
+
Requires-Python: >=3.10,<4.0
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Software Development :: Testing
|
|
22
|
+
Requires-Dist: langchain-anthropic (>=0.3.7,<0.4.0)
|
|
23
|
+
Requires-Dist: langchain-aws (>=0.2.10,<0.3.0)
|
|
24
|
+
Requires-Dist: langchain-community (>=0.3.9,<0.4.0)
|
|
25
|
+
Requires-Dist: langchain-google-genai (>=2.1.6,<3.0.0)
|
|
26
|
+
Requires-Dist: langchain-ollama (>=0.2.1,<0.3.0)
|
|
27
|
+
Requires-Dist: langchain-openai (>=0.2.11,<0.3.0)
|
|
28
|
+
Requires-Dist: langchain-text-splitters (>=0.3.4,<0.4.0)
|
|
29
|
+
Requires-Dist: ollama (>=0.4.0,<0.5.0)
|
|
30
|
+
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
|
|
31
|
+
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
|
32
|
+
Requires-Dist: robotframework (>=7.1.1,<8.0.0)
|
|
33
|
+
Requires-Dist: tiktoken (>=0.8.0,<0.9.0)
|
|
34
|
+
Requires-Dist: tqdm (>=4.67.1,<5.0.0)
|
|
35
|
+
Requires-Dist: typer (>=0.15.1,<0.16.0)
|
|
36
|
+
Project-URL: Homepage, https://github.com/miltroj/result-companion
|
|
37
|
+
Project-URL: Repository, https://github.com/miltroj/result-companion
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
|
|
40
|
+
# Result Companion
|
|
41
|
+
|
|
42
|
+
[](https://pypi.org/project/result-companion/)
|
|
43
|
+
[](https://pypi.org/project/result-companion/)
|
|
44
|
+
[](https://github.com/miltroj/result-companion/blob/main/LICENSE)
|
|
45
|
+
[](https://github.com/miltroj/result-companion/actions/workflows/publish.yml)
|
|
46
|
+
|
|
47
|
+
**Turn your Robot Framework test failures into instant, actionable insights with AI.**
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
## Why Result Companion?
|
|
52
|
+
|
|
53
|
+
Every QA engineer knows the pain: A test fails. You dig through logs. You trace keywords. You hunt for that one error message buried in thousands of lines. **Hours wasted.**
|
|
54
|
+
|
|
55
|
+
Result Companion changes that. It reads your `output.xml`, understands the entire test flow, and tells you exactly what went wrong and how to fix it—in seconds, not hours.
|
|
56
|
+
|
|
57
|
+
## What It Does
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Before: Manual debugging for hours
|
|
61
|
+
robot tests/ # Test fails
|
|
62
|
+
# Now: Where did it fail? Why? What's the root cause?
|
|
63
|
+
|
|
64
|
+
# After: Instant AI analysis
|
|
65
|
+
result-companion analyze -o output.xml # Get answers in seconds
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Your enhanced `log.html` now includes:
|
|
69
|
+
- **Root Cause Analysis**: Pinpoints the exact keyword and reason for failure
|
|
70
|
+
- **Test Flow Summary**: Understand what happened at a glance
|
|
71
|
+
- **Actionable Fixes**: Specific suggestions to resolve the issue
|
|
72
|
+
|
|
73
|
+
## Quick Start
|
|
74
|
+
|
|
75
|
+
### Option 1: Local AI (Free, Private)
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip install result-companion
|
|
79
|
+
|
|
80
|
+
# Auto-setup local AI model
|
|
81
|
+
result-companion setup ollama
|
|
82
|
+
result-companion setup model deepseek-r1:1.5b
|
|
83
|
+
|
|
84
|
+
# Analyze your tests
|
|
85
|
+
result-companion analyze -o output.xml
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Option 2: Cloud AI ([OpenAI](https://github.com/miltroj/result-companion/blob/main/examples/EXAMPLES.md#openai), Azure, Google)
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install result-companion
|
|
92
|
+
|
|
93
|
+
# Configure and run
|
|
94
|
+
export OPENAI_API_KEY="your-key"
|
|
95
|
+
result-companion analyze -o output.xml -c examples/openai_config.yaml
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Real Example
|
|
99
|
+
|
|
100
|
+
**Your test fails with:**
|
|
101
|
+
```
|
|
102
|
+
Login Test Suite
|
|
103
|
+
└── Login With Valid Credentials [FAIL]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Result Companion tells you:**
|
|
107
|
+
```markdown
|
|
108
|
+
**Flow**
|
|
109
|
+
- Open browser to login page ✓
|
|
110
|
+
- Enter username "testuser" ✓
|
|
111
|
+
- Enter password ✓
|
|
112
|
+
- Click login button ✓
|
|
113
|
+
- Wait for dashboard [FAILED after 10s timeout]
|
|
114
|
+
|
|
115
|
+
**Failure Root Cause**
|
|
116
|
+
The keyword "Wait Until Page Contains Element" failed because
|
|
117
|
+
element 'id=dashboard' was not found. Server returned 503 error
|
|
118
|
+
in network logs at timestamp 14:23:45.
|
|
119
|
+
|
|
120
|
+
**Potential Fixes**
|
|
121
|
+
- Check if backend service is running and healthy
|
|
122
|
+
- Verify dashboard element selector hasn't changed
|
|
123
|
+
- Increase timeout if service startup is slow
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Beyond Error Analysis
|
|
127
|
+
|
|
128
|
+
Customize prompts for any use case:
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
# security_audit.yaml
|
|
132
|
+
llm_config:
|
|
133
|
+
question_prompt: |
|
|
134
|
+
Find security issues: hardcoded passwords,
|
|
135
|
+
exposed tokens, insecure configurations...
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
```yaml
|
|
139
|
+
# performance_review.yaml
|
|
140
|
+
llm_config:
|
|
141
|
+
question_prompt: |
|
|
142
|
+
Identify slow operations, unnecessary waits,
|
|
143
|
+
inefficient loops...
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
See [examples/EXAMPLES.md](https://github.com/miltroj/result-companion/blob/main/examples/EXAMPLES.md) for more.
|
|
147
|
+
|
|
148
|
+
## Configuration Examples
|
|
149
|
+
|
|
150
|
+
Check [`examples/`](https://github.com/miltroj/result-companion/tree/main/examples) for ready-to-use configs:
|
|
151
|
+
- Local Ollama setup (default)
|
|
152
|
+
- OpenAI, Azure, Google Cloud
|
|
153
|
+
- Custom endpoints (Databricks, self-hosted)
|
|
154
|
+
- Prompt customization for security, performance, quality reviews
|
|
155
|
+
|
|
156
|
+
## Filter Tests by Tags
|
|
157
|
+
|
|
158
|
+
Analyze only the tests you care about:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# Analyze smoke tests only
|
|
162
|
+
result-companion -o output.xml --include "smoke*"
|
|
163
|
+
|
|
164
|
+
# Exclude work-in-progress tests
|
|
165
|
+
result-companion -o output.xml --exclude "wip,draft*"
|
|
166
|
+
|
|
167
|
+
# Analyze critical tests (including passes)
|
|
168
|
+
result-companion -o output.xml --include "critical*" -i
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Or use config file:
|
|
172
|
+
```yaml
|
|
173
|
+
test_filter:
|
|
174
|
+
include_tags: ["smoke", "critical*"]
|
|
175
|
+
exclude_tags: ["wip", "flaky"]
|
|
176
|
+
include_passing: false # Analyze failures only
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
See [examples/tag_filtering_config.yaml](https://github.com/miltroj/result-companion/blob/main/examples/tag_filtering_config.yaml) for details.
|
|
180
|
+
|
|
181
|
+
## Limitations
|
|
182
|
+
|
|
183
|
+
- Text-only analysis (no screenshots/videos)
|
|
184
|
+
- Large test suites processed in chunks
|
|
185
|
+
- **Local models**: Need 4-8GB RAM + GPU/NPU for good performance (Apple Silicon, NVIDIA, AMD)
|
|
186
|
+
|
|
187
|
+
## Contributing
|
|
188
|
+
|
|
189
|
+
Contributions welcome! See [CONTRIBUTING.md](https://github.com/miltroj/result-companion/blob/main/CONTRIBUTING.md) for guidelines.
|
|
190
|
+
|
|
191
|
+
For bugs or feature requests, open an issue on GitHub.
|
|
192
|
+
|
|
193
|
+
## Development Setup
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# Install with dev dependencies
|
|
197
|
+
poetry install --with=dev
|
|
198
|
+
|
|
199
|
+
# Install pre-commit hooks
|
|
200
|
+
poetry run pre-commit install
|
|
201
|
+
|
|
202
|
+
# Run tests
|
|
203
|
+
poetry run inv unittests
|
|
204
|
+
poetry run inv test_coverage
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## License
|
|
208
|
+
|
|
209
|
+
Apache 2.0 - See [LICENSE](https://github.com/miltroj/result-companion/blob/main/LICENSE)
|
|
210
|
+
|
|
211
|
+
## Disclaimer
|
|
212
|
+
|
|
213
|
+
Cloud AI providers may process your test data. Local models (Ollama) keep everything private on your machine.
|
|
214
|
+
|
|
215
|
+
**You are responsible for data privacy.** The creator takes no responsibility for data exposure, intellectual property leakage, or security issues. By using Result Companion, you accept all risks and ensure compliance with your organization's data policies.
|
|
216
|
+
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Result Companion
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/result-companion/)
|
|
4
|
+
[](https://pypi.org/project/result-companion/)
|
|
5
|
+
[](https://github.com/miltroj/result-companion/blob/main/LICENSE)
|
|
6
|
+
[](https://github.com/miltroj/result-companion/actions/workflows/publish.yml)
|
|
7
|
+
|
|
8
|
+
**Turn your Robot Framework test failures into instant, actionable insights with AI.**
|
|
9
|
+
|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
## Why Result Companion?
|
|
13
|
+
|
|
14
|
+
Every QA engineer knows the pain: A test fails. You dig through logs. You trace keywords. You hunt for that one error message buried in thousands of lines. **Hours wasted.**
|
|
15
|
+
|
|
16
|
+
Result Companion changes that. It reads your `output.xml`, understands the entire test flow, and tells you exactly what went wrong and how to fix it—in seconds, not hours.
|
|
17
|
+
|
|
18
|
+
## What It Does
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Before: Manual debugging for hours
|
|
22
|
+
robot tests/ # Test fails
|
|
23
|
+
# Now: Where did it fail? Why? What's the root cause?
|
|
24
|
+
|
|
25
|
+
# After: Instant AI analysis
|
|
26
|
+
result-companion analyze -o output.xml # Get answers in seconds
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Your enhanced `log.html` now includes:
|
|
30
|
+
- **Root Cause Analysis**: Pinpoints the exact keyword and reason for failure
|
|
31
|
+
- **Test Flow Summary**: Understand what happened at a glance
|
|
32
|
+
- **Actionable Fixes**: Specific suggestions to resolve the issue
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
### Option 1: Local AI (Free, Private)
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install result-companion
|
|
40
|
+
|
|
41
|
+
# Auto-setup local AI model
|
|
42
|
+
result-companion setup ollama
|
|
43
|
+
result-companion setup model deepseek-r1:1.5b
|
|
44
|
+
|
|
45
|
+
# Analyze your tests
|
|
46
|
+
result-companion analyze -o output.xml
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Option 2: Cloud AI ([OpenAI](https://github.com/miltroj/result-companion/blob/main/examples/EXAMPLES.md#openai), Azure, Google)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install result-companion
|
|
53
|
+
|
|
54
|
+
# Configure and run
|
|
55
|
+
export OPENAI_API_KEY="your-key"
|
|
56
|
+
result-companion analyze -o output.xml -c examples/openai_config.yaml
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Real Example
|
|
60
|
+
|
|
61
|
+
**Your test fails with:**
|
|
62
|
+
```
|
|
63
|
+
Login Test Suite
|
|
64
|
+
└── Login With Valid Credentials [FAIL]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Result Companion tells you:**
|
|
68
|
+
```markdown
|
|
69
|
+
**Flow**
|
|
70
|
+
- Open browser to login page ✓
|
|
71
|
+
- Enter username "testuser" ✓
|
|
72
|
+
- Enter password ✓
|
|
73
|
+
- Click login button ✓
|
|
74
|
+
- Wait for dashboard [FAILED after 10s timeout]
|
|
75
|
+
|
|
76
|
+
**Failure Root Cause**
|
|
77
|
+
The keyword "Wait Until Page Contains Element" failed because
|
|
78
|
+
element 'id=dashboard' was not found. Server returned 503 error
|
|
79
|
+
in network logs at timestamp 14:23:45.
|
|
80
|
+
|
|
81
|
+
**Potential Fixes**
|
|
82
|
+
- Check if backend service is running and healthy
|
|
83
|
+
- Verify dashboard element selector hasn't changed
|
|
84
|
+
- Increase timeout if service startup is slow
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Beyond Error Analysis
|
|
88
|
+
|
|
89
|
+
Customize prompts for any use case:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
# security_audit.yaml
|
|
93
|
+
llm_config:
|
|
94
|
+
question_prompt: |
|
|
95
|
+
Find security issues: hardcoded passwords,
|
|
96
|
+
exposed tokens, insecure configurations...
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
# performance_review.yaml
|
|
101
|
+
llm_config:
|
|
102
|
+
question_prompt: |
|
|
103
|
+
Identify slow operations, unnecessary waits,
|
|
104
|
+
inefficient loops...
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
See [examples/EXAMPLES.md](https://github.com/miltroj/result-companion/blob/main/examples/EXAMPLES.md) for more.
|
|
108
|
+
|
|
109
|
+
## Configuration Examples
|
|
110
|
+
|
|
111
|
+
Check [`examples/`](https://github.com/miltroj/result-companion/tree/main/examples) for ready-to-use configs:
|
|
112
|
+
- Local Ollama setup (default)
|
|
113
|
+
- OpenAI, Azure, Google Cloud
|
|
114
|
+
- Custom endpoints (Databricks, self-hosted)
|
|
115
|
+
- Prompt customization for security, performance, quality reviews
|
|
116
|
+
|
|
117
|
+
## Filter Tests by Tags
|
|
118
|
+
|
|
119
|
+
Analyze only the tests you care about:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Analyze smoke tests only
|
|
123
|
+
result-companion -o output.xml --include "smoke*"
|
|
124
|
+
|
|
125
|
+
# Exclude work-in-progress tests
|
|
126
|
+
result-companion -o output.xml --exclude "wip,draft*"
|
|
127
|
+
|
|
128
|
+
# Analyze critical tests (including passes)
|
|
129
|
+
result-companion -o output.xml --include "critical*" -i
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Or use config file:
|
|
133
|
+
```yaml
|
|
134
|
+
test_filter:
|
|
135
|
+
include_tags: ["smoke", "critical*"]
|
|
136
|
+
exclude_tags: ["wip", "flaky"]
|
|
137
|
+
include_passing: false # Analyze failures only
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
See [examples/tag_filtering_config.yaml](https://github.com/miltroj/result-companion/blob/main/examples/tag_filtering_config.yaml) for details.
|
|
141
|
+
|
|
142
|
+
## Limitations
|
|
143
|
+
|
|
144
|
+
- Text-only analysis (no screenshots/videos)
|
|
145
|
+
- Large test suites processed in chunks
|
|
146
|
+
- **Local models**: Need 4-8GB RAM + GPU/NPU for good performance (Apple Silicon, NVIDIA, AMD)
|
|
147
|
+
|
|
148
|
+
## Contributing
|
|
149
|
+
|
|
150
|
+
Contributions welcome! See [CONTRIBUTING.md](https://github.com/miltroj/result-companion/blob/main/CONTRIBUTING.md) for guidelines.
|
|
151
|
+
|
|
152
|
+
For bugs or feature requests, open an issue on GitHub.
|
|
153
|
+
|
|
154
|
+
## Development Setup
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# Install with dev dependencies
|
|
158
|
+
poetry install --with=dev
|
|
159
|
+
|
|
160
|
+
# Install pre-commit hooks
|
|
161
|
+
poetry run pre-commit install
|
|
162
|
+
|
|
163
|
+
# Run tests
|
|
164
|
+
poetry run inv unittests
|
|
165
|
+
poetry run inv test_coverage
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## License
|
|
169
|
+
|
|
170
|
+
Apache 2.0 - See [LICENSE](https://github.com/miltroj/result-companion/blob/main/LICENSE)
|
|
171
|
+
|
|
172
|
+
## Disclaimer
|
|
173
|
+
|
|
174
|
+
Cloud AI providers may process your test data. Local models (Ollama) keep everything private on your machine.
|
|
175
|
+
|
|
176
|
+
**You are responsible for data privacy.** The creator takes no responsibility for data exposure, intellectual property leakage, or security issues. By using Result Companion, you accept all risks and ensure compliance with your organization's data policies.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "result-companion"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "AI-powered analysis of Robot Framework test failures - instant insights from output.xml"
|
|
5
|
+
authors = ["Milosz Trojanowski <mil.troj@gmail.com>"]
|
|
6
|
+
license = "Apache-2.0"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
homepage = "https://github.com/miltroj/result-companion"
|
|
9
|
+
repository = "https://github.com/miltroj/result-companion"
|
|
10
|
+
keywords = ["robotframework", "testing", "ai", "llm", "test-analysis", "ollama", "openai"]
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Development Status :: 4 - Beta",
|
|
13
|
+
"Environment :: Console",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"License :: OSI Approved :: Apache Software License",
|
|
16
|
+
"Programming Language :: Python :: 3.10",
|
|
17
|
+
"Programming Language :: Python :: 3.11",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Topic :: Software Development :: Testing",
|
|
21
|
+
]
|
|
22
|
+
packages = [{include = "result_companion"}]
|
|
23
|
+
|
|
24
|
+
[tool.poetry.dependencies]
|
|
25
|
+
python = "^3.10"
|
|
26
|
+
robotframework = "^7.1.1"
|
|
27
|
+
typer = "^0.15.1"
|
|
28
|
+
ollama = "^0.4.0"
|
|
29
|
+
python-dotenv = "^1.0.1"
|
|
30
|
+
pyyaml = "^6.0.2"
|
|
31
|
+
langchain-ollama = "^0.2.1"
|
|
32
|
+
langchain-community = "^0.3.9"
|
|
33
|
+
langchain-openai = "^0.2.11"
|
|
34
|
+
langchain-aws = "^0.2.10"
|
|
35
|
+
tiktoken = "^0.8.0"
|
|
36
|
+
langchain-text-splitters = "^0.3.4"
|
|
37
|
+
langchain-google-genai = "^2.1.6"
|
|
38
|
+
langchain-anthropic = "^0.3.7"
|
|
39
|
+
tqdm = "^4.67.1"
|
|
40
|
+
|
|
41
|
+
[tool.poetry.scripts]
|
|
42
|
+
result-companion = "result_companion.entrypoints.cli.cli_app:app"
|
|
43
|
+
|
|
44
|
+
[tool.poetry.group.dev.dependencies]
|
|
45
|
+
black = "^24.10.0"
|
|
46
|
+
flake8 = "^7.1.1"
|
|
47
|
+
isort = "^5.13.2"
|
|
48
|
+
mypy = "^1.13.0"
|
|
49
|
+
pytest = "^8.3.3"
|
|
50
|
+
invoke = "^2.2.0"
|
|
51
|
+
pytest-mock = "^3.14.0"
|
|
52
|
+
pytest-cov = "^6.0.0"
|
|
53
|
+
pytest-asyncio = "^0.24.0"
|
|
54
|
+
pre-commit = "^4.1.0"
|
|
55
|
+
|
|
56
|
+
[build-system]
|
|
57
|
+
requires = ["poetry-core"]
|
|
58
|
+
build-backend = "poetry.core.masonry.api"
|
|
File without changes
|