Skip to content

Commit 443c383

Browse files
author
Shriyansh Agnihotri
committed
Making few changes to make testzeus hercules work on windows
1 parent 2ccea0b commit 443c383

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ Our mission? To **democratize and disrupt test automation**, making top-tier tes
4343
- **Enhancing Hercules with Community-Driven Tools**
4444
Discover how to customize Hercules and incorporate additional tools provided by the community.
4545
_[Watch now](https://youtu.be/C8hUy5leRF0?si=yVMpZ7WFcI01BoI3)_
46+
---
47+
48+
#### 🛠️ **API Testing**
49+
- **API testing all the way, new ways to do end to end**
50+
_[Watch now](https://youtu.be/qMt89DQH6LQ?si=lcSJbKOCaqqUGeQ8)_
51+
---
52+
53+
#### 🛠️ **Security Testing**
54+
- **Security Testing done end to end**
55+
_[Watch now](https://youtu.be/o6MmfTakIh4?si=JL8iu4e3i85SWrxU)_
4656

4757
---
4858

testzeus_hercules/telemetry.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ class EventType(Enum):
3535

3636
class EventData(BaseModel):
3737
detail: Optional[str] = None
38-
additional_data: Optional[Dict[str, Any]] = None # For any extra details specific to certain events
38+
additional_data: Optional[Dict[str, Any]] = (
39+
None # For any extra details specific to certain events
40+
)
3941

4042

4143
def my_before_send(event: Event, hint: Hint) -> Event | None:
@@ -69,7 +71,9 @@ def my_before_send(event: Event, hint: Hint) -> Event | None:
6971
send_default_pii=False,
7072
send_client_reports=False,
7173
server_name=None,
72-
event_scrubber=EventScrubber(denylist=denylist, pii_denylist=pii_denylist, recursive=True),
74+
event_scrubber=EventScrubber(
75+
denylist=denylist, pii_denylist=pii_denylist, recursive=True
76+
),
7377
)
7478
sentry_sdk.set_extra("sys.argv", None)
7579
sentry_sdk.set_user(None)
@@ -141,7 +145,10 @@ def build_final_message() -> Dict[str, Any]:
141145
message = {
142146
"installation_id": event_collector["installation_id"],
143147
"session_start": event_collector["start_time"],
144-
"buckets": {event_type_s: events for event_type_s, events in event_collector["buckets"].items()},
148+
"buckets": {
149+
event_type_s: events
150+
for event_type_s, events in event_collector["buckets"].items()
151+
},
145152
}
146153
return message
147154

@@ -161,9 +168,11 @@ def on_shutdown():
161168
# Schedule shutdown_wrapper to be run asynchronously
162169
asyncio.create_task(shutdown_wrapper())
163170

164-
loop = asyncio.get_event_loop()
165-
loop.add_signal_handler(signal.SIGTERM, on_shutdown)
166-
loop.add_signal_handler(signal.SIGINT, on_shutdown)
171+
# loop = asyncio.get_event_loop()
172+
signal.signal(signal.SIGTERM, on_shutdown)
173+
signal.signal(signal.SIGINT, on_shutdown)
174+
# loop.add_signal_handler(signal.SIGTERM, on_shutdown)
175+
# loop.add_signal_handler(signal.SIGINT, on_shutdown)
167176

168177
# Register with atexit to ensure it runs when the program exits
169178
atexit.register(lambda: asyncio.run(shutdown_wrapper()))

0 commit comments

Comments
 (0)