2 Hits in 1.3 sec

Unit Test Case Generation with Transformers and Focal Context [article]

Michele Tufano, Dawn Drain, Alexey Svyatkovskiy, Shao Kun Deng, Neel Sundaresan
2021 arXiv   pre-print
We also introduce Methods2Test, the largest publicly available supervised parallel corpus of unit test case methods and corresponding focal methods in Java, which comprises 780K test cases mined from 91K  ...  We formulate unit test case generation as a sequence-to-sequence learning task, adopting a two-step training procedure consisting of denoising pretraining on a large unsupervised Java corpus, and supervised  ...  Our evaluation shows that ATHENATEST is able to generate syntactically correct test cases that invoke a variety of testing APIs.  ... 
arXiv:2009.05617v2 fatcat:5hthwabsxvg3thelnz2rosq7ze

Neural Unit Test Suggestions [article]

Elizabeth Dinella, Shuvendu K. Lahiri, Todd Mytkowicz, Gabriel Ryan
2021 arXiv   pre-print
In this paper, we propose (Neural Unit Test Suggestions), a unified transformer-based neural approach to infer both exceptional and assertion test oracles based on the context of the focal method.  ...  A test oracle, typically expressed as an condition, documents the intended behavior of the unit under a given test prefix.  ...  Similar to our construction of Methods2Test*, we remove the method implementation, normalize the test method name, and remove the assertion from the test case.  ... 
arXiv:2109.09262v1 fatcat:grf5jm2dhveytjo6r7lj555pga