Dataset Viewer
Auto-converted to Parquet Duplicate
instruction
stringclasses
10 values
input
stringclasses
10 values
output
stringclasses
10 values
Write instructions to generate testcases for IP blocking automation script in Python.
The IP blocking technique restricts access by denying connections from particular IP addresses. This technique is often used to protect against cyber threats such as phishing, hacking, and data breaches. The IP blocking method involves identification, blocking, and types of IP blocking.
To generate testcases for IP blocking automation script in Python, follow these steps: 1. Identify the malicious or unauthorized IP addresses. 2. Add the identified IP addresses to a blocklist. 3. Implement automated blocking using security systems based on predefined rules or real-time threat intelligence. Example t...
Write test cases for a login feature with different user types and scenarios.
User types: admin, moderator, user; scenarios: successful login, failed login, forgot password.
Feature: Login Scenario: Successful login as admin Given I am logged in as admin When I enter correct credentials Then I should see the admin dashboard Scenario: Failed login with incorrect password Given I am logged in as user When I enter incorrect password Then I should see an error message Scenario: Forgot passwo...
Write instructions to generate testcases for a login feature with user authentication and password reset in python.
User tries to login with invalid credentials, then tries to reset password with an email that does not exist.
Given the user is on the login page When the user enters invalid credentials Then the error message should be displayed Scenario: Reset Password Given the user is on the login page When the user clicks on the forgot password link Then the user is redirected to the reset password page When the user enters an email that...
Write different instructions to generate testcases and automation script in python for a payment gateway API.
A user attempts to make a payment with an invalid credit card number.
Given a payment gateway API When user attempts to make a payment with invalid credit card number Then payment should be rejected and error message should be displayed import requests # Send a POST request to the payment API with invalid credit card number response = requests.post('https://example.com/payment', js...
Create a dataset with instructions, input scenarios, and output responses to test the login functionality of a web application.
A user attempts to log in with a valid username and password.
Given a web application login page When user enters valid username and password Then user should be logged in successfully import selenium # Launch the web browser and navigate to the login page driver = selenium.Chrome() driver.get('https://example.com/login') # Enter valid username and password driver.find_ele...
Develop instructions, input scenarios, and output responses to test the functionality of a shopping cart API.
A user adds a product to their shopping cart and then removes it.
Given a shopping cart API When user adds product to cart And user removes product from cart Then product should be removed from cart import requests # Send a POST request to add product to cart response = requests.post('https://example.com/cart/add', json={'product_id': 123}) # Send a DELETE request to remove ...
Write a test case for IP blocking using BDD format and generate Python code for automation.
As a system administrator, I want to block IP addresses that have been flagged as malicious to prevent cyber threats.
Given the IP address is flagged as malicious When the system administrator adds the IP to the blocklist Then the IP address should be denied access to the system import requests def block_ip(ip_address): # Add IP to blocklist blocklist.add(ip_address) # Deny access to the system return {'status': 'den...
Write a BDD feature for IP blocking to prevent phishing attacks
A user attempts to access a website from a known phishing IP address
Given the user is on a phishing IP address When the user attempts to access the website Then the website should block the user and display an error message
Generate a Python script to automate IP blocking for a specific website
The website has a known IP address range for phishing attacks and uses Cloudflare for security
import cloudflare from cloudflare import Client client = Client('your_api_key', 'your_api_email') # Define the IP address range to block block_ip_range = '192.168.1.0/24' # Block the IP range using Cloudflare client.add_ip_to_blocklist(block_ip_range)
Create a test case for IP blocking to prevent spam activities
A user sends a high volume of emails from a known spam IP address
Given the user is on a spam IP address When the user sends an email Then the email server should block the user and display an error message
README.md exists but content is empty.
Downloads last month
4