This commit is contained in:
Tomas Dvorak
2026-03-02 20:20:56 +01:00
parent dfc079288f
commit 84a8acf944
86 changed files with 3938 additions and 1289 deletions
+5 -6
View File
@@ -10,7 +10,7 @@ import random
from datetime import datetime, timedelta
class FormTester:
def __init__(self, base_url="http://192.168.2.38"):
def __init__(self, base_url="http://192.168.2.36"):
self.base_url = base_url
self.session = requests.Session()
self.session.headers.update({
@@ -89,15 +89,14 @@ class FormTester:
return {
'nazev': company_name,
'mesto': city,
'datum_zalozeni': founding_date,
'odeslat': 'Uložit do databáze'
'datum_zalozeni': founding_date
}
def submit_form(self, form_data):
"""Submit the form with provided data"""
try:
response = self.session.post(
f"{self.base_url}/zapisfirem.php",
f"{self.base_url}/firmy_vloz.php",
data=form_data,
timeout=30
)
@@ -128,7 +127,7 @@ class FormTester:
def run_test(self, interval_seconds=20, max_iterations=None):
"""Run the form testing loop"""
print(f"🧪 Starting form testing...")
print(f"📡 Target: {self.base_url}/zapisfirem.php")
print(f"📡 Target: {self.base_url}/firmy_vloz.php")
print(f"⏰ Interval: {interval_seconds} seconds")
print(f"🔄 Max iterations: {'Unlimited' if max_iterations is None else max_iterations}")
print("=" * 60)
@@ -175,7 +174,7 @@ def main():
tester = FormTester()
# Run with 0.5-second interval for faster testing (you can change this)
tester.run_test(interval_seconds=0.001)
tester.run_test(interval_seconds=0.0001)
if __name__ == "__main__":
main()