<p>I raised this in a PPP QA. Lars said that he knows of two possible inroads to the problem:</p>
<ul>
<li>Write additional contracts with the sole purpose of testing.</li>
<li><a href="https://github.com/tweag/plutus-libs/tree/main/cooked-validators" rel="nofollow noreferrer">cooked validators</a> from Tweag</li>
</ul>

CC BY-SA 4.0
2022-02-15T17:05:54.047Z
2022-02-15T17:05:54.047Z
waalge
<p>There are extensive examples for the testing frameworks for contracts, ie off-chain code, for example as discussed in Lecture 8 of the plutus pioneer program <a href="https://youtu.be/zW3D2iM5uVg" rel="nofollow noreferrer">https://youtu.be/zW3D2iM5uVg</a>.</p>
<p>Its mentioned there that one thing not covered is the testing of validators directly, ie on-chain code.
Are there examples of this available?</p>

<plutus><plutus-pioneer-program><unit-test>
Examples of testing on-chain code
# Examples of testing on-chain code

(Asked by: username_0 on 2022-01-28)

There are extensive examples for the testing frameworks for contracts, ie off-chain code, for example as discussed in Lecture 8 of the plutus pioneer program <https://youtu.be/zW3D2iM5uVg>.

Its mentioned there that one thing not covered is the testing of validators directly, ie on-chain code.
Are there examples of this available?

**Tags:** plutus, plutus-pioneer-program, unit-test

---

## 1 answers

### Answer by username_0 on 2022-02-15. Score: 2

I raised this in a PPP QA. Lars said that he knows of two possible inroads to the problem:

* Write additional contracts with the sole purpose of testing.
* [cooked validators](https://github.com/tweag/plutus-libs/tree/main/cooked-validators) from Tweag


---

