Genial Agent Smith o ejecuta miles de pruebas sin servidor

Les presento una traducción de un artículo de Medium "Smith - Ejecutor de pruebas sin servidor"





Trate de recordar con qué frecuencia se metió en esta situación. El día antes de la fecha límite, ejecuta un conjunto masivo de pruebas de integración y las deja hervir a fuego lento durante la noche. Y por la mañana, con horror en sus ojos, ¿descubre que la mitad de ellos provienen de una falla accidental en la red?





"-" -, . , ...





, , , - ", - // "...





. , , , , ?





. , 4 . 2 -, . 20 " ", . , , . 100% "" . . ... , !





- Smith. , , , , .





Serverless , - AWS. , Smith AWS.





Smith REST-api . API Gateway Lambda-, , ECS-. ECS " ", ( ). S3, SQS, "". ECS-, , "". , .





, , , 89% " -". Smith , 100%.





Smith - Cloud Formation , . . , , Serverless : S3 , SQS , , API Gateway ECS .





, , API- POST- . :





{"launchId": "ID_OF_TEST_LAUNCH", "executables": [
         { "testcaseUuid": "1", "metadata": { "projectId":"com.testquack",     "artifactId":"smith-maven-s3-tests",     "version":"1.0-SNAPSHOT",     "package":"com.testquack.smith.maven",     "class":"TestScopeTest", "method":"resourceDataTest"}},
         {"testcaseUuid": "2",  "metadata": { "projectId":"com.testquack",     "artifactId":"smith-maven-s3-tests",     "version":"1.0-SNAPSHOT",     "package":"com.testquack.smith.maven",     "class":"TestScopeTest", "method":"simpleTest"}},
         {"testcaseUuid": "3", "metadata": { "projectId":"com.testquack",     "artifactId":"smith-maven-s3-tests",     "version":"1.0-SNAPSHOT",     "package":"com.testquack.smith.maven",     "class":"TestScopeTest", "method":"simpleTest"}},
     ]
 }
      
      





( "method" ) ECS-. S3- “smith-reports-[REGION]-[ACCOUNT_ID]”, - , - - “smith-results” SQS.









Smith Maven JUnit . Gradle, NUnit, Pytest, ..





Smith , .





test-jar.





<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <version>3.2.0</version>
    <executions>
        <execution>
            <goals>
                <goal>test-jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>
      
      



Smith-. , Maven Central - - . , , - .





Smith- settings.xml “smith-private-settings-[REGION]-[ACCOUNT_ID]”, . settings.xml ECS Maven- .





- S3, Smith. build wagon-plugin





<build>
    <extensions>
        <extension>
            <groupId>com.testquack.smith</groupId>
            <artifactId>s3-storage-wagon</artifactId>
            <version>1.0</version>
        </extension>
    </extensions>
...
</build>
      
      



- ~/.m2/settings.xml AWS-:





<server>
    <id>my-repo-bucket-snapshot</id>
    <username>AWS_ACCESS_KEY</username>
    <password>AWS_SECRET_KEY</password>
    <configuration>
        <region>us-east-1</region>
    </configuration>
</server>
<server>
    <id>my-repo-bucket-release</id>
    <username>AWS_ACCESS_KEY</username>
    <password>AWS_SECRET_KEY</password>
    <configuration>
        <region>us-east-1</region>
    </configuration>
</server>
      
      



, , distribution management pom- ,





<distributionManagement>
    <snapshotRepository>
        <id>my-repo-bucket-snapshot</id>
        <url>s3://smith-artifacts-snapshot-[REGION]-[ACCOUNT_ID]</url>
    </snapshotRepository>
    <repository>
        <id>my-repo-bucket-release</id>
        <url>s3://smith-artifacts-release-[REGION]-[ACCOUNT_ID]</url>
    </repository>
</distributionManagement>
      
      



, “mvn clean deploy” , Smith. API .













- Smith API Gateway , POST- . , , .





.. Smith GreatBit, . - - QuAck. QuAck Smith Launcher - , Serverless Smith . , QuAck , .





, QuAck - . . - QuAck .





, QuAck, , Smith Launcher. , - .









Smith - , . , , . , -.





Y la mejor parte es que todo es gratis. Tanto Smith como QuAck . Tómalo, configúralo, ejecútalo, guárdalo y disfrútalo. Bueno, si tiene alguna pregunta, los desarrolladores del equipo de GreatBit siempre tienen prisa por ayudar.












All Articles