エージェントスミスをクールにするか、何千ものサーバーレステストを実行する

Medium 「Smith-ServerlessTestRunner」の記事の翻訳を紹介します





この状況に陥った頻度を覚えておいてください。締め切りの前日に、統合テストの大規模なセットを実行し、それらを一晩煮ます。そして、朝、あなたの目に恐怖があり、それらの半分が偶発的なネットワーク障害から来たことがわかりますか?





"-" -, . , ...





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





. , , , , ?





. , 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 - , . , , . , -.





そして最良の部分はそれがすべて無料であるということです。両方ともスミスいんちきそれを取り、構成し、実行し、保存してお楽しみください。質問がある場合は、GreatBitチームの開発者が常に急いで支援します。












All Articles