Dataset Preview
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code: DatasetGenerationError
Exception: CastError
Message: Couldn't cast
name: string
pretty_name: string
category: string
samples: int64
language: string
license: string
format: list<item: string>
child 0, item: string
to
{'id': Value('string'), 'category': Value('string'), 'language': Value('string'), 'framework': Value('string'), 'scenario': Value('string'), 'code_under_test': Value('string'), 'testing_goal': Value('string'), 'test_code': Value('string'), 'explanation': Value('string'), 'difficulty': Value('int64')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
num_examples, num_bytes = writer.finalize()
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 781, in finalize
self.write_rows_on_file()
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 663, in write_rows_on_file
self._write_table(table)
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 773, in _write_table
pa_table = table_cast(pa_table, self._schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
name: string
pretty_name: string
category: string
samples: int64
language: string
license: string
format: list<item: string>
child 0, item: string
to
{'id': Value('string'), 'category': Value('string'), 'language': Value('string'), 'framework': Value('string'), 'scenario': Value('string'), 'code_under_test': Value('string'), 'testing_goal': Value('string'), 'test_code': Value('string'), 'explanation': Value('string'), 'difficulty': Value('int64')}
because column names don't match
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1361, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 940, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1683, in _prepare_split
for job_id, done, content in self._prepare_split_single(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1869, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
id string | category string | language string | framework string | scenario string | code_under_test string | testing_goal string | test_code string | explanation string | difficulty int64 |
|---|---|---|---|---|---|---|---|---|---|
AITST_00001 | testing | javascript | jest | Write tests for a JavaScript function used in the checkout domain. | function processEvent(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('event', () => {
it('handles a normal input set', () => {
expect(processEvent(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use jest to assert deterministic behavior and protect the event logic from regressions. | 1 |
AITST_00002 | testing | typescript | vitest | Write tests for a TypeScript function used in the inventory domain. | function processPayload(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('payload', () => {
it('handles a normal input set', () => {
expect(processPayload(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use vitest to assert deterministic behavior and protect the payload logic from regressions. | 2 |
AITST_00003 | testing | java | JUnit | Write tests for a Java function used in the recommendations domain. | public int processFile(List<String> items) {
int total = 0;
for (String item : items) total += item.length();
return total;
} | Validate the happy path, edge cases, and error handling. | import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.List;
class FileTest {
@Test
void shouldProcessItems() {
assertEquals(6, processFile(List.of("a", "bb", "ccc")));
}
} | Use JUnit to assert deterministic behavior and protect the file logic from regressions. | 3 |
AITST_00004 | testing | go | testing | Write tests for a Go function used in the audit domain. | func processRecord(items []string) int {
total := 0
for _, item := range items { total += len(item) }
return total
} | Validate the happy path, edge cases, and error handling. | package main
import "testing"
func TestProcessRecord(t *testing.T) {
got := processRecord([]string{"a", "bb", "ccc"})
if got != 6 {
t.Fatalf("expected 6, got %d", got)
}
} | Use testing to assert deterministic behavior and protect the record logic from regressions. | 4 |
AITST_00005 | testing | rust | cargo test | Write tests for a Rust function used in the logging domain. | fn process_metric(items: &[String]) -> usize {
items.iter().map(|item| item.len()).sum()
} | Validate the happy path, edge cases, and error handling. | #[test]
fn test_process_metric() {
let data = vec![String::from("a"), String::from("bb"), String::from("ccc")];
assert_eq!(process_metric(&data), 6);
} | Use cargo test to assert deterministic behavior and protect the metric logic from regressions. | 5 |
AITST_00006 | testing | cpp | GoogleTest | Write tests for a C++ function used in the sync domain. | int process_notification(const vector<string>& items) {
int total = 0;
for (const auto& item : items) total += item.size();
return total;
} | Validate the happy path, edge cases, and error handling. | #include <gtest/gtest.h>
TEST(ProcessNotification, HandlesInput) {
std::vector<std::string> items = {"a", "bb", "ccc"};
EXPECT_EQ(process_notification(items), 6);
} | Use GoogleTest to assert deterministic behavior and protect the notification logic from regressions. | 1 |
AITST_00007 | testing | bash | bats | Write tests for a Bash function used in the streaming domain. | #!/usr/bin/env bash
printf '%s\n' "$1" | tr -d ' ' | wc -c | Validate the happy path, edge cases, and error handling. | #!/usr/bin/env bats
@test "counts characters" {
run ./script.sh "abc"
[ "$status" -eq 0 ]
} | Use bats to assert deterministic behavior and protect the task logic from regressions. | 2 |
AITST_00008 | testing | sql | dbt tests | Write tests for a SQL function used in the exports domain. | SELECT COUNT(*) FROM exports_routes; | Validate the happy path, edge cases, and error handling. | -- Example dbt test
select *
from my_table
where id is null; | Use dbt tests to assert deterministic behavior and protect the route logic from regressions. | 3 |
AITST_00009 | testing | python | pytest | Write tests for a Python function used in the imports domain. | def process_service(items):
total = 0
for item in items:
total += len(str(item))
return total | Validate the happy path, edge cases, and error handling. | import pytest
def test_service_happy_path():
items = ["a", "bb", "ccc"]
assert process_service(items) == 6
def test_service_empty_input():
assert process_service([]) == 0 | Use pytest to assert deterministic behavior and protect the service logic from regressions. | 4 |
AITST_00010 | testing | javascript | jest | Write tests for a JavaScript function used in the payments domain. | function processAdapter(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('adapter', () => {
it('handles a normal input set', () => {
expect(processAdapter(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use jest to assert deterministic behavior and protect the adapter logic from regressions. | 5 |
AITST_00011 | testing | typescript | vitest | Write tests for a TypeScript function used in the messaging domain. | function processHandler(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('handler', () => {
it('handles a normal input set', () => {
expect(processHandler(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use vitest to assert deterministic behavior and protect the handler logic from regressions. | 1 |
AITST_00012 | testing | java | JUnit | Write tests for a Java function used in the admin domain. | public int processController(List<String> items) {
int total = 0;
for (String item : items) total += item.length();
return total;
} | Validate the happy path, edge cases, and error handling. | import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.List;
class ControllerTest {
@Test
void shouldProcessItems() {
assertEquals(6, processController(List.of("a", "bb", "ccc")));
}
} | Use JUnit to assert deterministic behavior and protect the controller logic from regressions. | 2 |
AITST_00013 | testing | go | testing | Write tests for a Go function used in the dashboard domain. | func processRepository(items []string) int {
total := 0
for _, item := range items { total += len(item) }
return total
} | Validate the happy path, edge cases, and error handling. | package main
import "testing"
func TestProcessRepository(t *testing.T) {
got := processRepository([]string{"a", "bb", "ccc"})
if got != 6 {
t.Fatalf("expected 6, got %d", got)
}
} | Use testing to assert deterministic behavior and protect the repository logic from regressions. | 3 |
AITST_00014 | testing | rust | cargo test | Write tests for a Rust function used in the billing domain. | fn process_client(items: &[String]) -> usize {
items.iter().map(|item| item.len()).sum()
} | Validate the happy path, edge cases, and error handling. | #[test]
fn test_process_client() {
let data = vec![String::from("a"), String::from("bb"), String::from("ccc")];
assert_eq!(process_client(&data), 6);
} | Use cargo test to assert deterministic behavior and protect the client logic from regressions. | 4 |
AITST_00015 | testing | cpp | GoogleTest | Write tests for a C++ function used in the auth domain. | int process_pipeline(const vector<string>& items) {
int total = 0;
for (const auto& item : items) total += item.size();
return total;
} | Validate the happy path, edge cases, and error handling. | #include <gtest/gtest.h>
TEST(ProcessPipeline, HandlesInput) {
std::vector<std::string> items = {"a", "bb", "ccc"};
EXPECT_EQ(process_pipeline(items), 6);
} | Use GoogleTest to assert deterministic behavior and protect the pipeline logic from regressions. | 5 |
AITST_00016 | testing | bash | bats | Write tests for a Bash function used in the search domain. | #!/usr/bin/env bash
printf '%s\n' "$1" | tr -d ' ' | wc -c | Validate the happy path, edge cases, and error handling. | #!/usr/bin/env bats
@test "counts characters" {
run ./script.sh "abc"
[ "$status" -eq 0 ]
} | Use bats to assert deterministic behavior and protect the module logic from regressions. | 1 |
AITST_00017 | testing | sql | dbt tests | Write tests for a SQL function used in the analytics domain. | SELECT COUNT(*) FROM analytics_invoices; | Validate the happy path, edge cases, and error handling. | -- Example dbt test
select *
from my_table
where id is null; | Use dbt tests to assert deterministic behavior and protect the invoice logic from regressions. | 2 |
AITST_00018 | testing | python | pytest | Write tests for a Python function used in the notifications domain. | def process_session(items):
total = 0
for item in items:
total += len(str(item))
return total | Validate the happy path, edge cases, and error handling. | import pytest
def test_session_happy_path():
items = ["a", "bb", "ccc"]
assert process_session(items) == 6
def test_session_empty_input():
assert process_session([]) == 0 | Use pytest to assert deterministic behavior and protect the session logic from regressions. | 3 |
AITST_00019 | testing | javascript | jest | Write tests for a JavaScript function used in the reports domain. | function processToken(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('token', () => {
it('handles a normal input set', () => {
expect(processToken(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use jest to assert deterministic behavior and protect the token logic from regressions. | 4 |
AITST_00020 | testing | typescript | vitest | Write tests for a TypeScript function used in the cache domain. | function processQueue(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('queue', () => {
it('handles a normal input set', () => {
expect(processQueue(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use vitest to assert deterministic behavior and protect the queue logic from regressions. | 5 |
AITST_00021 | testing | java | JUnit | Write tests for a Java function used in the scheduler domain. | public int processWorker(List<String> items) {
int total = 0;
for (String item : items) total += item.length();
return total;
} | Validate the happy path, edge cases, and error handling. | import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.List;
class WorkerTest {
@Test
void shouldProcessItems() {
assertEquals(6, processWorker(List.of("a", "bb", "ccc")));
}
} | Use JUnit to assert deterministic behavior and protect the worker logic from regressions. | 1 |
AITST_00022 | testing | go | testing | Write tests for a Go function used in the uploads domain. | func processParser(items []string) int {
total := 0
for _, item := range items { total += len(item) }
return total
} | Validate the happy path, edge cases, and error handling. | package main
import "testing"
func TestProcessParser(t *testing.T) {
got := processParser([]string{"a", "bb", "ccc"})
if got != 6 {
t.Fatalf("expected 6, got %d", got)
}
} | Use testing to assert deterministic behavior and protect the parser logic from regressions. | 2 |
AITST_00023 | testing | rust | cargo test | Write tests for a Rust function used in the webhooks domain. | fn process_report(items: &[String]) -> usize {
items.iter().map(|item| item.len()).sum()
} | Validate the happy path, edge cases, and error handling. | #[test]
fn test_process_report() {
let data = vec![String::from("a"), String::from("bb"), String::from("ccc")];
assert_eq!(process_report(&data), 6);
} | Use cargo test to assert deterministic behavior and protect the report logic from regressions. | 3 |
AITST_00024 | testing | cpp | GoogleTest | Write tests for a C++ function used in the profiles domain. | int process_profile(const vector<string>& items) {
int total = 0;
for (const auto& item : items) total += item.size();
return total;
} | Validate the happy path, edge cases, and error handling. | #include <gtest/gtest.h>
TEST(ProcessProfile, HandlesInput) {
std::vector<std::string> items = {"a", "bb", "ccc"};
EXPECT_EQ(process_profile(items), 6);
} | Use GoogleTest to assert deterministic behavior and protect the profile logic from regressions. | 4 |
AITST_00025 | testing | bash | bats | Write tests for a Bash function used in the checkout domain. | #!/usr/bin/env bash
printf '%s\n' "$1" | tr -d ' ' | wc -c | Validate the happy path, edge cases, and error handling. | #!/usr/bin/env bats
@test "counts characters" {
run ./script.sh "abc"
[ "$status" -eq 0 ]
} | Use bats to assert deterministic behavior and protect the cart logic from regressions. | 5 |
AITST_00026 | testing | sql | dbt tests | Write tests for a SQL function used in the inventory domain. | SELECT COUNT(*) FROM inventory_orders; | Validate the happy path, edge cases, and error handling. | -- Example dbt test
select *
from my_table
where id is null; | Use dbt tests to assert deterministic behavior and protect the order logic from regressions. | 1 |
AITST_00027 | testing | python | pytest | Write tests for a Python function used in the recommendations domain. | def process_cache_key(items):
total = 0
for item in items:
total += len(str(item))
return total | Validate the happy path, edge cases, and error handling. | import pytest
def test_cache_key_happy_path():
items = ["a", "bb", "ccc"]
assert process_cache_key(items) == 6
def test_cache_key_empty_input():
assert process_cache_key([]) == 0 | Use pytest to assert deterministic behavior and protect the cache_key logic from regressions. | 2 |
AITST_00028 | testing | javascript | jest | Write tests for a JavaScript function used in the audit domain. | function processJob(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('job', () => {
it('handles a normal input set', () => {
expect(processJob(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use jest to assert deterministic behavior and protect the job logic from regressions. | 3 |
AITST_00029 | testing | typescript | vitest | Write tests for a TypeScript function used in the logging domain. | function processEvent(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('event', () => {
it('handles a normal input set', () => {
expect(processEvent(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use vitest to assert deterministic behavior and protect the event logic from regressions. | 4 |
AITST_00030 | testing | java | JUnit | Write tests for a Java function used in the sync domain. | public int processPayload(List<String> items) {
int total = 0;
for (String item : items) total += item.length();
return total;
} | Validate the happy path, edge cases, and error handling. | import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.List;
class PayloadTest {
@Test
void shouldProcessItems() {
assertEquals(6, processPayload(List.of("a", "bb", "ccc")));
}
} | Use JUnit to assert deterministic behavior and protect the payload logic from regressions. | 5 |
AITST_00031 | testing | go | testing | Write tests for a Go function used in the streaming domain. | func processFile(items []string) int {
total := 0
for _, item := range items { total += len(item) }
return total
} | Validate the happy path, edge cases, and error handling. | package main
import "testing"
func TestProcessFile(t *testing.T) {
got := processFile([]string{"a", "bb", "ccc"})
if got != 6 {
t.Fatalf("expected 6, got %d", got)
}
} | Use testing to assert deterministic behavior and protect the file logic from regressions. | 1 |
AITST_00032 | testing | rust | cargo test | Write tests for a Rust function used in the exports domain. | fn process_record(items: &[String]) -> usize {
items.iter().map(|item| item.len()).sum()
} | Validate the happy path, edge cases, and error handling. | #[test]
fn test_process_record() {
let data = vec![String::from("a"), String::from("bb"), String::from("ccc")];
assert_eq!(process_record(&data), 6);
} | Use cargo test to assert deterministic behavior and protect the record logic from regressions. | 2 |
AITST_00033 | testing | cpp | GoogleTest | Write tests for a C++ function used in the imports domain. | int process_metric(const vector<string>& items) {
int total = 0;
for (const auto& item : items) total += item.size();
return total;
} | Validate the happy path, edge cases, and error handling. | #include <gtest/gtest.h>
TEST(ProcessMetric, HandlesInput) {
std::vector<std::string> items = {"a", "bb", "ccc"};
EXPECT_EQ(process_metric(items), 6);
} | Use GoogleTest to assert deterministic behavior and protect the metric logic from regressions. | 3 |
AITST_00034 | testing | bash | bats | Write tests for a Bash function used in the payments domain. | #!/usr/bin/env bash
printf '%s\n' "$1" | tr -d ' ' | wc -c | Validate the happy path, edge cases, and error handling. | #!/usr/bin/env bats
@test "counts characters" {
run ./script.sh "abc"
[ "$status" -eq 0 ]
} | Use bats to assert deterministic behavior and protect the notification logic from regressions. | 4 |
AITST_00035 | testing | sql | dbt tests | Write tests for a SQL function used in the messaging domain. | SELECT COUNT(*) FROM messaging_tasks; | Validate the happy path, edge cases, and error handling. | -- Example dbt test
select *
from my_table
where id is null; | Use dbt tests to assert deterministic behavior and protect the task logic from regressions. | 5 |
AITST_00036 | testing | python | pytest | Write tests for a Python function used in the admin domain. | def process_route(items):
total = 0
for item in items:
total += len(str(item))
return total | Validate the happy path, edge cases, and error handling. | import pytest
def test_route_happy_path():
items = ["a", "bb", "ccc"]
assert process_route(items) == 6
def test_route_empty_input():
assert process_route([]) == 0 | Use pytest to assert deterministic behavior and protect the route logic from regressions. | 1 |
AITST_00037 | testing | javascript | jest | Write tests for a JavaScript function used in the dashboard domain. | function processService(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('service', () => {
it('handles a normal input set', () => {
expect(processService(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use jest to assert deterministic behavior and protect the service logic from regressions. | 2 |
AITST_00038 | testing | typescript | vitest | Write tests for a TypeScript function used in the billing domain. | function processAdapter(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('adapter', () => {
it('handles a normal input set', () => {
expect(processAdapter(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use vitest to assert deterministic behavior and protect the adapter logic from regressions. | 3 |
AITST_00039 | testing | java | JUnit | Write tests for a Java function used in the auth domain. | public int processHandler(List<String> items) {
int total = 0;
for (String item : items) total += item.length();
return total;
} | Validate the happy path, edge cases, and error handling. | import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.List;
class HandlerTest {
@Test
void shouldProcessItems() {
assertEquals(6, processHandler(List.of("a", "bb", "ccc")));
}
} | Use JUnit to assert deterministic behavior and protect the handler logic from regressions. | 4 |
AITST_00040 | testing | go | testing | Write tests for a Go function used in the search domain. | func processController(items []string) int {
total := 0
for _, item := range items { total += len(item) }
return total
} | Validate the happy path, edge cases, and error handling. | package main
import "testing"
func TestProcessController(t *testing.T) {
got := processController([]string{"a", "bb", "ccc"})
if got != 6 {
t.Fatalf("expected 6, got %d", got)
}
} | Use testing to assert deterministic behavior and protect the controller logic from regressions. | 5 |
AITST_00041 | testing | rust | cargo test | Write tests for a Rust function used in the analytics domain. | fn process_repository(items: &[String]) -> usize {
items.iter().map(|item| item.len()).sum()
} | Validate the happy path, edge cases, and error handling. | #[test]
fn test_process_repository() {
let data = vec![String::from("a"), String::from("bb"), String::from("ccc")];
assert_eq!(process_repository(&data), 6);
} | Use cargo test to assert deterministic behavior and protect the repository logic from regressions. | 1 |
AITST_00042 | testing | cpp | GoogleTest | Write tests for a C++ function used in the notifications domain. | int process_client(const vector<string>& items) {
int total = 0;
for (const auto& item : items) total += item.size();
return total;
} | Validate the happy path, edge cases, and error handling. | #include <gtest/gtest.h>
TEST(ProcessClient, HandlesInput) {
std::vector<std::string> items = {"a", "bb", "ccc"};
EXPECT_EQ(process_client(items), 6);
} | Use GoogleTest to assert deterministic behavior and protect the client logic from regressions. | 2 |
AITST_00043 | testing | bash | bats | Write tests for a Bash function used in the reports domain. | #!/usr/bin/env bash
printf '%s\n' "$1" | tr -d ' ' | wc -c | Validate the happy path, edge cases, and error handling. | #!/usr/bin/env bats
@test "counts characters" {
run ./script.sh "abc"
[ "$status" -eq 0 ]
} | Use bats to assert deterministic behavior and protect the pipeline logic from regressions. | 3 |
AITST_00044 | testing | sql | dbt tests | Write tests for a SQL function used in the cache domain. | SELECT COUNT(*) FROM cache_modules; | Validate the happy path, edge cases, and error handling. | -- Example dbt test
select *
from my_table
where id is null; | Use dbt tests to assert deterministic behavior and protect the module logic from regressions. | 4 |
AITST_00045 | testing | python | pytest | Write tests for a Python function used in the scheduler domain. | def process_invoice(items):
total = 0
for item in items:
total += len(str(item))
return total | Validate the happy path, edge cases, and error handling. | import pytest
def test_invoice_happy_path():
items = ["a", "bb", "ccc"]
assert process_invoice(items) == 6
def test_invoice_empty_input():
assert process_invoice([]) == 0 | Use pytest to assert deterministic behavior and protect the invoice logic from regressions. | 5 |
AITST_00046 | testing | javascript | jest | Write tests for a JavaScript function used in the uploads domain. | function processSession(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('session', () => {
it('handles a normal input set', () => {
expect(processSession(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use jest to assert deterministic behavior and protect the session logic from regressions. | 1 |
AITST_00047 | testing | typescript | vitest | Write tests for a TypeScript function used in the webhooks domain. | function processToken(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('token', () => {
it('handles a normal input set', () => {
expect(processToken(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use vitest to assert deterministic behavior and protect the token logic from regressions. | 2 |
AITST_00048 | testing | java | JUnit | Write tests for a Java function used in the profiles domain. | public int processQueue(List<String> items) {
int total = 0;
for (String item : items) total += item.length();
return total;
} | Validate the happy path, edge cases, and error handling. | import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.List;
class QueueTest {
@Test
void shouldProcessItems() {
assertEquals(6, processQueue(List.of("a", "bb", "ccc")));
}
} | Use JUnit to assert deterministic behavior and protect the queue logic from regressions. | 3 |
AITST_00049 | testing | go | testing | Write tests for a Go function used in the checkout domain. | func processWorker(items []string) int {
total := 0
for _, item := range items { total += len(item) }
return total
} | Validate the happy path, edge cases, and error handling. | package main
import "testing"
func TestProcessWorker(t *testing.T) {
got := processWorker([]string{"a", "bb", "ccc"})
if got != 6 {
t.Fatalf("expected 6, got %d", got)
}
} | Use testing to assert deterministic behavior and protect the worker logic from regressions. | 4 |
AITST_00050 | testing | rust | cargo test | Write tests for a Rust function used in the inventory domain. | fn process_parser(items: &[String]) -> usize {
items.iter().map(|item| item.len()).sum()
} | Validate the happy path, edge cases, and error handling. | #[test]
fn test_process_parser() {
let data = vec![String::from("a"), String::from("bb"), String::from("ccc")];
assert_eq!(process_parser(&data), 6);
} | Use cargo test to assert deterministic behavior and protect the parser logic from regressions. | 5 |
AITST_00051 | testing | cpp | GoogleTest | Write tests for a C++ function used in the recommendations domain. | int process_report(const vector<string>& items) {
int total = 0;
for (const auto& item : items) total += item.size();
return total;
} | Validate the happy path, edge cases, and error handling. | #include <gtest/gtest.h>
TEST(ProcessReport, HandlesInput) {
std::vector<std::string> items = {"a", "bb", "ccc"};
EXPECT_EQ(process_report(items), 6);
} | Use GoogleTest to assert deterministic behavior and protect the report logic from regressions. | 1 |
AITST_00052 | testing | bash | bats | Write tests for a Bash function used in the audit domain. | #!/usr/bin/env bash
printf '%s\n' "$1" | tr -d ' ' | wc -c | Validate the happy path, edge cases, and error handling. | #!/usr/bin/env bats
@test "counts characters" {
run ./script.sh "abc"
[ "$status" -eq 0 ]
} | Use bats to assert deterministic behavior and protect the profile logic from regressions. | 2 |
AITST_00053 | testing | sql | dbt tests | Write tests for a SQL function used in the logging domain. | SELECT COUNT(*) FROM logging_carts; | Validate the happy path, edge cases, and error handling. | -- Example dbt test
select *
from my_table
where id is null; | Use dbt tests to assert deterministic behavior and protect the cart logic from regressions. | 3 |
AITST_00054 | testing | python | pytest | Write tests for a Python function used in the sync domain. | def process_order(items):
total = 0
for item in items:
total += len(str(item))
return total | Validate the happy path, edge cases, and error handling. | import pytest
def test_order_happy_path():
items = ["a", "bb", "ccc"]
assert process_order(items) == 6
def test_order_empty_input():
assert process_order([]) == 0 | Use pytest to assert deterministic behavior and protect the order logic from regressions. | 4 |
AITST_00055 | testing | javascript | jest | Write tests for a JavaScript function used in the streaming domain. | function processCache_Key(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('cache_key', () => {
it('handles a normal input set', () => {
expect(processCache_Key(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use jest to assert deterministic behavior and protect the cache_key logic from regressions. | 5 |
AITST_00056 | testing | typescript | vitest | Write tests for a TypeScript function used in the exports domain. | function processJob(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('job', () => {
it('handles a normal input set', () => {
expect(processJob(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use vitest to assert deterministic behavior and protect the job logic from regressions. | 1 |
AITST_00057 | testing | java | JUnit | Write tests for a Java function used in the imports domain. | public int processEvent(List<String> items) {
int total = 0;
for (String item : items) total += item.length();
return total;
} | Validate the happy path, edge cases, and error handling. | import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.List;
class EventTest {
@Test
void shouldProcessItems() {
assertEquals(6, processEvent(List.of("a", "bb", "ccc")));
}
} | Use JUnit to assert deterministic behavior and protect the event logic from regressions. | 2 |
AITST_00058 | testing | go | testing | Write tests for a Go function used in the payments domain. | func processPayload(items []string) int {
total := 0
for _, item := range items { total += len(item) }
return total
} | Validate the happy path, edge cases, and error handling. | package main
import "testing"
func TestProcessPayload(t *testing.T) {
got := processPayload([]string{"a", "bb", "ccc"})
if got != 6 {
t.Fatalf("expected 6, got %d", got)
}
} | Use testing to assert deterministic behavior and protect the payload logic from regressions. | 3 |
AITST_00059 | testing | rust | cargo test | Write tests for a Rust function used in the messaging domain. | fn process_file(items: &[String]) -> usize {
items.iter().map(|item| item.len()).sum()
} | Validate the happy path, edge cases, and error handling. | #[test]
fn test_process_file() {
let data = vec![String::from("a"), String::from("bb"), String::from("ccc")];
assert_eq!(process_file(&data), 6);
} | Use cargo test to assert deterministic behavior and protect the file logic from regressions. | 4 |
AITST_00060 | testing | cpp | GoogleTest | Write tests for a C++ function used in the admin domain. | int process_record(const vector<string>& items) {
int total = 0;
for (const auto& item : items) total += item.size();
return total;
} | Validate the happy path, edge cases, and error handling. | #include <gtest/gtest.h>
TEST(ProcessRecord, HandlesInput) {
std::vector<std::string> items = {"a", "bb", "ccc"};
EXPECT_EQ(process_record(items), 6);
} | Use GoogleTest to assert deterministic behavior and protect the record logic from regressions. | 5 |
AITST_00061 | testing | bash | bats | Write tests for a Bash function used in the dashboard domain. | #!/usr/bin/env bash
printf '%s\n' "$1" | tr -d ' ' | wc -c | Validate the happy path, edge cases, and error handling. | #!/usr/bin/env bats
@test "counts characters" {
run ./script.sh "abc"
[ "$status" -eq 0 ]
} | Use bats to assert deterministic behavior and protect the metric logic from regressions. | 1 |
AITST_00062 | testing | sql | dbt tests | Write tests for a SQL function used in the billing domain. | SELECT COUNT(*) FROM billing_notifications; | Validate the happy path, edge cases, and error handling. | -- Example dbt test
select *
from my_table
where id is null; | Use dbt tests to assert deterministic behavior and protect the notification logic from regressions. | 2 |
AITST_00063 | testing | python | pytest | Write tests for a Python function used in the auth domain. | def process_task(items):
total = 0
for item in items:
total += len(str(item))
return total | Validate the happy path, edge cases, and error handling. | import pytest
def test_task_happy_path():
items = ["a", "bb", "ccc"]
assert process_task(items) == 6
def test_task_empty_input():
assert process_task([]) == 0 | Use pytest to assert deterministic behavior and protect the task logic from regressions. | 3 |
AITST_00064 | testing | javascript | jest | Write tests for a JavaScript function used in the search domain. | function processRoute(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('route', () => {
it('handles a normal input set', () => {
expect(processRoute(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use jest to assert deterministic behavior and protect the route logic from regressions. | 4 |
AITST_00065 | testing | typescript | vitest | Write tests for a TypeScript function used in the analytics domain. | function processService(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('service', () => {
it('handles a normal input set', () => {
expect(processService(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use vitest to assert deterministic behavior and protect the service logic from regressions. | 5 |
AITST_00066 | testing | java | JUnit | Write tests for a Java function used in the notifications domain. | public int processAdapter(List<String> items) {
int total = 0;
for (String item : items) total += item.length();
return total;
} | Validate the happy path, edge cases, and error handling. | import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.List;
class AdapterTest {
@Test
void shouldProcessItems() {
assertEquals(6, processAdapter(List.of("a", "bb", "ccc")));
}
} | Use JUnit to assert deterministic behavior and protect the adapter logic from regressions. | 1 |
AITST_00067 | testing | go | testing | Write tests for a Go function used in the reports domain. | func processHandler(items []string) int {
total := 0
for _, item := range items { total += len(item) }
return total
} | Validate the happy path, edge cases, and error handling. | package main
import "testing"
func TestProcessHandler(t *testing.T) {
got := processHandler([]string{"a", "bb", "ccc"})
if got != 6 {
t.Fatalf("expected 6, got %d", got)
}
} | Use testing to assert deterministic behavior and protect the handler logic from regressions. | 2 |
AITST_00068 | testing | rust | cargo test | Write tests for a Rust function used in the cache domain. | fn process_controller(items: &[String]) -> usize {
items.iter().map(|item| item.len()).sum()
} | Validate the happy path, edge cases, and error handling. | #[test]
fn test_process_controller() {
let data = vec![String::from("a"), String::from("bb"), String::from("ccc")];
assert_eq!(process_controller(&data), 6);
} | Use cargo test to assert deterministic behavior and protect the controller logic from regressions. | 3 |
AITST_00069 | testing | cpp | GoogleTest | Write tests for a C++ function used in the scheduler domain. | int process_repository(const vector<string>& items) {
int total = 0;
for (const auto& item : items) total += item.size();
return total;
} | Validate the happy path, edge cases, and error handling. | #include <gtest/gtest.h>
TEST(ProcessRepository, HandlesInput) {
std::vector<std::string> items = {"a", "bb", "ccc"};
EXPECT_EQ(process_repository(items), 6);
} | Use GoogleTest to assert deterministic behavior and protect the repository logic from regressions. | 4 |
AITST_00070 | testing | bash | bats | Write tests for a Bash function used in the uploads domain. | #!/usr/bin/env bash
printf '%s\n' "$1" | tr -d ' ' | wc -c | Validate the happy path, edge cases, and error handling. | #!/usr/bin/env bats
@test "counts characters" {
run ./script.sh "abc"
[ "$status" -eq 0 ]
} | Use bats to assert deterministic behavior and protect the client logic from regressions. | 5 |
AITST_00071 | testing | sql | dbt tests | Write tests for a SQL function used in the webhooks domain. | SELECT COUNT(*) FROM webhooks_pipelines; | Validate the happy path, edge cases, and error handling. | -- Example dbt test
select *
from my_table
where id is null; | Use dbt tests to assert deterministic behavior and protect the pipeline logic from regressions. | 1 |
AITST_00072 | testing | python | pytest | Write tests for a Python function used in the profiles domain. | def process_module(items):
total = 0
for item in items:
total += len(str(item))
return total | Validate the happy path, edge cases, and error handling. | import pytest
def test_module_happy_path():
items = ["a", "bb", "ccc"]
assert process_module(items) == 6
def test_module_empty_input():
assert process_module([]) == 0 | Use pytest to assert deterministic behavior and protect the module logic from regressions. | 2 |
AITST_00073 | testing | javascript | jest | Write tests for a JavaScript function used in the checkout domain. | function processInvoice(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('invoice', () => {
it('handles a normal input set', () => {
expect(processInvoice(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use jest to assert deterministic behavior and protect the invoice logic from regressions. | 3 |
AITST_00074 | testing | typescript | vitest | Write tests for a TypeScript function used in the inventory domain. | function processSession(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('session', () => {
it('handles a normal input set', () => {
expect(processSession(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use vitest to assert deterministic behavior and protect the session logic from regressions. | 4 |
AITST_00075 | testing | java | JUnit | Write tests for a Java function used in the recommendations domain. | public int processToken(List<String> items) {
int total = 0;
for (String item : items) total += item.length();
return total;
} | Validate the happy path, edge cases, and error handling. | import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.List;
class TokenTest {
@Test
void shouldProcessItems() {
assertEquals(6, processToken(List.of("a", "bb", "ccc")));
}
} | Use JUnit to assert deterministic behavior and protect the token logic from regressions. | 5 |
AITST_00076 | testing | go | testing | Write tests for a Go function used in the audit domain. | func processQueue(items []string) int {
total := 0
for _, item := range items { total += len(item) }
return total
} | Validate the happy path, edge cases, and error handling. | package main
import "testing"
func TestProcessQueue(t *testing.T) {
got := processQueue([]string{"a", "bb", "ccc"})
if got != 6 {
t.Fatalf("expected 6, got %d", got)
}
} | Use testing to assert deterministic behavior and protect the queue logic from regressions. | 1 |
AITST_00077 | testing | rust | cargo test | Write tests for a Rust function used in the logging domain. | fn process_worker(items: &[String]) -> usize {
items.iter().map(|item| item.len()).sum()
} | Validate the happy path, edge cases, and error handling. | #[test]
fn test_process_worker() {
let data = vec![String::from("a"), String::from("bb"), String::from("ccc")];
assert_eq!(process_worker(&data), 6);
} | Use cargo test to assert deterministic behavior and protect the worker logic from regressions. | 2 |
AITST_00078 | testing | cpp | GoogleTest | Write tests for a C++ function used in the sync domain. | int process_parser(const vector<string>& items) {
int total = 0;
for (const auto& item : items) total += item.size();
return total;
} | Validate the happy path, edge cases, and error handling. | #include <gtest/gtest.h>
TEST(ProcessParser, HandlesInput) {
std::vector<std::string> items = {"a", "bb", "ccc"};
EXPECT_EQ(process_parser(items), 6);
} | Use GoogleTest to assert deterministic behavior and protect the parser logic from regressions. | 3 |
AITST_00079 | testing | bash | bats | Write tests for a Bash function used in the streaming domain. | #!/usr/bin/env bash
printf '%s\n' "$1" | tr -d ' ' | wc -c | Validate the happy path, edge cases, and error handling. | #!/usr/bin/env bats
@test "counts characters" {
run ./script.sh "abc"
[ "$status" -eq 0 ]
} | Use bats to assert deterministic behavior and protect the report logic from regressions. | 4 |
AITST_00080 | testing | sql | dbt tests | Write tests for a SQL function used in the exports domain. | SELECT COUNT(*) FROM exports_profiles; | Validate the happy path, edge cases, and error handling. | -- Example dbt test
select *
from my_table
where id is null; | Use dbt tests to assert deterministic behavior and protect the profile logic from regressions. | 5 |
AITST_00081 | testing | python | pytest | Write tests for a Python function used in the imports domain. | def process_cart(items):
total = 0
for item in items:
total += len(str(item))
return total | Validate the happy path, edge cases, and error handling. | import pytest
def test_cart_happy_path():
items = ["a", "bb", "ccc"]
assert process_cart(items) == 6
def test_cart_empty_input():
assert process_cart([]) == 0 | Use pytest to assert deterministic behavior and protect the cart logic from regressions. | 1 |
AITST_00082 | testing | javascript | jest | Write tests for a JavaScript function used in the payments domain. | function processOrder(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('order', () => {
it('handles a normal input set', () => {
expect(processOrder(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use jest to assert deterministic behavior and protect the order logic from regressions. | 2 |
AITST_00083 | testing | typescript | vitest | Write tests for a TypeScript function used in the messaging domain. | function processCache_Key(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('cache_key', () => {
it('handles a normal input set', () => {
expect(processCache_Key(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use vitest to assert deterministic behavior and protect the cache_key logic from regressions. | 3 |
AITST_00084 | testing | java | JUnit | Write tests for a Java function used in the admin domain. | public int processJob(List<String> items) {
int total = 0;
for (String item : items) total += item.length();
return total;
} | Validate the happy path, edge cases, and error handling. | import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.List;
class JobTest {
@Test
void shouldProcessItems() {
assertEquals(6, processJob(List.of("a", "bb", "ccc")));
}
} | Use JUnit to assert deterministic behavior and protect the job logic from regressions. | 4 |
AITST_00085 | testing | go | testing | Write tests for a Go function used in the dashboard domain. | func processEvent(items []string) int {
total := 0
for _, item := range items { total += len(item) }
return total
} | Validate the happy path, edge cases, and error handling. | package main
import "testing"
func TestProcessEvent(t *testing.T) {
got := processEvent([]string{"a", "bb", "ccc"})
if got != 6 {
t.Fatalf("expected 6, got %d", got)
}
} | Use testing to assert deterministic behavior and protect the event logic from regressions. | 5 |
AITST_00086 | testing | rust | cargo test | Write tests for a Rust function used in the billing domain. | fn process_payload(items: &[String]) -> usize {
items.iter().map(|item| item.len()).sum()
} | Validate the happy path, edge cases, and error handling. | #[test]
fn test_process_payload() {
let data = vec![String::from("a"), String::from("bb"), String::from("ccc")];
assert_eq!(process_payload(&data), 6);
} | Use cargo test to assert deterministic behavior and protect the payload logic from regressions. | 1 |
AITST_00087 | testing | cpp | GoogleTest | Write tests for a C++ function used in the auth domain. | int process_file(const vector<string>& items) {
int total = 0;
for (const auto& item : items) total += item.size();
return total;
} | Validate the happy path, edge cases, and error handling. | #include <gtest/gtest.h>
TEST(ProcessFile, HandlesInput) {
std::vector<std::string> items = {"a", "bb", "ccc"};
EXPECT_EQ(process_file(items), 6);
} | Use GoogleTest to assert deterministic behavior and protect the file logic from regressions. | 2 |
AITST_00088 | testing | bash | bats | Write tests for a Bash function used in the search domain. | #!/usr/bin/env bash
printf '%s\n' "$1" | tr -d ' ' | wc -c | Validate the happy path, edge cases, and error handling. | #!/usr/bin/env bats
@test "counts characters" {
run ./script.sh "abc"
[ "$status" -eq 0 ]
} | Use bats to assert deterministic behavior and protect the record logic from regressions. | 3 |
AITST_00089 | testing | sql | dbt tests | Write tests for a SQL function used in the analytics domain. | SELECT COUNT(*) FROM analytics_metrics; | Validate the happy path, edge cases, and error handling. | -- Example dbt test
select *
from my_table
where id is null; | Use dbt tests to assert deterministic behavior and protect the metric logic from regressions. | 4 |
AITST_00090 | testing | python | pytest | Write tests for a Python function used in the notifications domain. | def process_notification(items):
total = 0
for item in items:
total += len(str(item))
return total | Validate the happy path, edge cases, and error handling. | import pytest
def test_notification_happy_path():
items = ["a", "bb", "ccc"]
assert process_notification(items) == 6
def test_notification_empty_input():
assert process_notification([]) == 0 | Use pytest to assert deterministic behavior and protect the notification logic from regressions. | 5 |
AITST_00091 | testing | javascript | jest | Write tests for a JavaScript function used in the reports domain. | function processTask(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('task', () => {
it('handles a normal input set', () => {
expect(processTask(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use jest to assert deterministic behavior and protect the task logic from regressions. | 1 |
AITST_00092 | testing | typescript | vitest | Write tests for a TypeScript function used in the cache domain. | function processRoute(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('route', () => {
it('handles a normal input set', () => {
expect(processRoute(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use vitest to assert deterministic behavior and protect the route logic from regressions. | 2 |
AITST_00093 | testing | java | JUnit | Write tests for a Java function used in the scheduler domain. | public int processService(List<String> items) {
int total = 0;
for (String item : items) total += item.length();
return total;
} | Validate the happy path, edge cases, and error handling. | import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.List;
class ServiceTest {
@Test
void shouldProcessItems() {
assertEquals(6, processService(List.of("a", "bb", "ccc")));
}
} | Use JUnit to assert deterministic behavior and protect the service logic from regressions. | 3 |
AITST_00094 | testing | go | testing | Write tests for a Go function used in the uploads domain. | func processAdapter(items []string) int {
total := 0
for _, item := range items { total += len(item) }
return total
} | Validate the happy path, edge cases, and error handling. | package main
import "testing"
func TestProcessAdapter(t *testing.T) {
got := processAdapter([]string{"a", "bb", "ccc"})
if got != 6 {
t.Fatalf("expected 6, got %d", got)
}
} | Use testing to assert deterministic behavior and protect the adapter logic from regressions. | 4 |
AITST_00095 | testing | rust | cargo test | Write tests for a Rust function used in the webhooks domain. | fn process_handler(items: &[String]) -> usize {
items.iter().map(|item| item.len()).sum()
} | Validate the happy path, edge cases, and error handling. | #[test]
fn test_process_handler() {
let data = vec![String::from("a"), String::from("bb"), String::from("ccc")];
assert_eq!(process_handler(&data), 6);
} | Use cargo test to assert deterministic behavior and protect the handler logic from regressions. | 5 |
AITST_00096 | testing | cpp | GoogleTest | Write tests for a C++ function used in the profiles domain. | int process_controller(const vector<string>& items) {
int total = 0;
for (const auto& item : items) total += item.size();
return total;
} | Validate the happy path, edge cases, and error handling. | #include <gtest/gtest.h>
TEST(ProcessController, HandlesInput) {
std::vector<std::string> items = {"a", "bb", "ccc"};
EXPECT_EQ(process_controller(items), 6);
} | Use GoogleTest to assert deterministic behavior and protect the controller logic from regressions. | 1 |
AITST_00097 | testing | bash | bats | Write tests for a Bash function used in the checkout domain. | #!/usr/bin/env bash
printf '%s\n' "$1" | tr -d ' ' | wc -c | Validate the happy path, edge cases, and error handling. | #!/usr/bin/env bats
@test "counts characters" {
run ./script.sh "abc"
[ "$status" -eq 0 ]
} | Use bats to assert deterministic behavior and protect the repository logic from regressions. | 2 |
AITST_00098 | testing | sql | dbt tests | Write tests for a SQL function used in the inventory domain. | SELECT COUNT(*) FROM inventory_clients; | Validate the happy path, edge cases, and error handling. | -- Example dbt test
select *
from my_table
where id is null; | Use dbt tests to assert deterministic behavior and protect the client logic from regressions. | 3 |
AITST_00099 | testing | python | pytest | Write tests for a Python function used in the recommendations domain. | def process_pipeline(items):
total = 0
for item in items:
total += len(str(item))
return total | Validate the happy path, edge cases, and error handling. | import pytest
def test_pipeline_happy_path():
items = ["a", "bb", "ccc"]
assert process_pipeline(items) == 6
def test_pipeline_empty_input():
assert process_pipeline([]) == 0 | Use pytest to assert deterministic behavior and protect the pipeline logic from regressions. | 4 |
AITST_00100 | testing | javascript | jest | Write tests for a JavaScript function used in the audit domain. | function processModule(items) {
return items.map(item => String(item).trim()).filter(Boolean);
} | Validate the happy path, edge cases, and error handling. | describe('module', () => {
it('handles a normal input set', () => {
expect(processModule(['a', 'bb'])).toEqual(['a', 'bb']);
});
}); | Use jest to assert deterministic behavior and protect the module logic from regressions. | 5 |
End of preview.
AIForge-04-Testing
Testing Dataset for AI and Programming Tasks
Overview
AIForge-04-Testing is a curated English dataset designed for AI systems working on testing tasks in software engineering and programming.
Contents
data.jsonldata.jsonmetadata.json
Use Cases
- AI agent training
- Supervised fine-tuning
- Evaluation and benchmarking
- Software engineering research
Example Record
{
"id": "AITST_00001",
"category": "testing",
"language": "javascript",
"framework": "jest",
"scenario": "Write tests for a JavaScript function used in the checkout domain.",
"code_under_test": "function processEvent(items) {\n return items.map(item => String(item).trim()).filter(Boolean);\n}",
"testing_goal": "Validate the happy path, edge cases, and error handling.",
"test_code": "describe('event', () => {\n it('handles a normal input set', () => {\n expect(processEvent(['a', 'bb'])).toEqual(['a', 'bb']);\n });\n});",
"explanation": "Use jest to assert deterministic behavior and protect the event logic from regressions.",
"difficulty": 1
}
License
Released under CC BY 4.0.
Source
JumpLander
- Downloads last month
- 57