Copia collegamentoCollegamento copiato negli appunti!
Example C.2, “CalculatorITestClass” shows an example of how to write a test class for Apache Karaf in the Pax-Exam testing framework. The CalculatorITest class configures the Apache Karaf environment, installs the obr and wrapper features, and then runs a test against the two features (where the obr and wrapper features implement particular sets of commands in the command console).
The @RunWith annotation instructs JUnit4 to run the following test with the PaxExam class. This is the key step for integrating JUnit4 with the Pax-Exam testing framework.
The @Configuration annotation is specific to Pax-Exam and marks the following method as a configuration method for setting Pax-Exam testing options. The configuration method must be declared as public static and must have a return value of type, org.ops4j.pax.exam.Option[].
Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.
Rendiamo l’open source più inclusivo
Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.
Informazioni su Red Hat
Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.