# Ocena przez uruchomienie testów (poprawność funkcjonalna)

EN: **Execution-based grading with unit tests** · id `executiongrading` · aliases: functional correctness, unit-test grading, execution-based evaluation, ocena wykonaniem

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Ewaluacja i interpretowalność](https://aiatlasgraph.com/t/evaluation.md) › [Ewaluatory kodowe](https://aiatlasgraph.com/t/codeevals.md) › Ocena przez uruchomienie testów (poprawność funkcjonalna)

## Description

- PL: Ocena generowanego kodu przez wykonanie go w piaskownicy na testach jednostkowych lub integracyjnych.
- EN: Grading generated code by executing it in a sandbox against unit or integration tests.

## In one sentence

- PL: Kod napisany przez model ocenia się, uruchamiając go na przygotowanych testach, a nie porównując tekst z wzorcem.
- EN: Code written by a model is graded by running it against prepared tests, not by comparing its text to a model answer.

## Problem it solves

- PL: Dwa zupełnie różnie wyglądające programy mogą być oba poprawne, a podobny do wzorca może nie działać.
- EN: Two very different-looking programs can both be correct, while one that resembles the model answer may not work.

## What it does

- PL: Jak sprawdzenie przepisu przez ugotowanie potrawy: liczy się, czy wychodzi, nie czy słowa zgadzają się z książką kucharską.
- EN: Like testing a recipe by cooking it: what matters is whether the dish works, not whether the wording matches the cookbook.

## Everyday example

- PL: Asystent programisty poprawia funkcję liczenia rabatów; zmiana przechodzi, jeśli wcześniej padający test teraz przechodzi, a reszta dalej działa.
- EN: A coding assistant fixes a discount function; the change passes if the previously failing test now passes and the rest still work.

## This concerns you if you…

- PL: używasz AI do pisania lub poprawiania kodu
- PL: porównujesz asystentów programisty na własnych zadaniach
- EN: you use AI to write or fix code
- EN: you compare coding assistants on your own tasks

## Keywords

HumanEval · unit tests · sandboxed execution · test coverage · static analysis

## How it works

- PL: Każde zadanie ma testy; wygenerowany kod uruchamia się w izolowanej piaskownicy z ograniczoną siecią, a wynikiem jest zaliczenie wszystkich testów. Uzupełnieniem bywają linter, typowanie i analiza bezpieczeństwa.
- EN: Each task has tests; generated code runs in an isolated sandbox with restricted network, and success means passing all tests. Linters, type checks and security analysis often complement them.

## Limits

- PL: Wynik jest tak dobry jak testy: słabe testy przepuszczają kod, który tylko je oszukuje. Nie ocenia czytelności ani stylu. Uruchamianie obcego kodu wymaga bezpiecznej piaskownicy i kosztuje czas obliczeń.
- EN: Results are only as good as the tests: weak tests pass code that merely games them. Readability and style are not assessed. Running untrusted code requires a safe sandbox and compute time.

## Key terms

- PL: **poprawność funkcjonalna**: Program robi to, co ma robić, sprawdzone przez uruchomienie.
- PL: **test jednostkowy**: Automatyczny test małego fragmentu programu z określonym wejściem i oczekiwanym wynikiem.
- PL: **piaskownica**: Odizolowane środowisko, w którym obcy kod nie zaszkodzi systemowi.
- EN: **functional correctness**: The program does what it should, verified by running it.
- EN: **unit test**: An automated check of a small program component with a specified input and expected result.
- EN: **sandbox**: An isolated environment where untrusted code cannot harm the system.

## Know first

- [Benchmarki programistyczne (Coding benchmarks)](https://aiatlasgraph.com/t/codingbench.md)
- [Agenci kodujący (AI-assisted coding)](https://aiatlasgraph.com/t/aicoding.md)

## Sources

- [Evaluating Large Language Models Trained on Code](<https://arxiv.org/abs/2107.03374>) `codex-humaneval-2021` · by Mark Chen, Jerry Tworek i in. (OpenAI)

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/executiongrading · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
