小编Cat*_*hal的帖子

d3.js从url获取JSON

情况是我试图让d3读取存储在Windows Azure Blob存储中的JSON文件.如果我将网址粘贴到浏览器中,则该文件将下载到我的计算机上.我希望能够使用d3从url获取JSON文件,但是没有生成图表,这让我相信d3无法读取文件.

以下是代码片段:

            var url = "http://storageName.blob.core.windows.net/containerName/file.json";

            d3.json("url", function (json) {

             //code here
            })
Run Code Online (Sandbox Code Playgroud)

我已经在Azure上将容器设置为公共,所以我相信任何有网址的人都可以访问它.有什么建议?

javascript json azure d3.js

3
推荐指数
2
解决办法
2万
查看次数

测试完成后自动生成诱惑报告

我试图找出在TestNG套件完成后如何自动构建诱惑报告.我知道可以通过mvn site在测试后手动运行来创建报告,但如果可以自动生成报告,那将会很棒.下面是我的pom.xml中的allure配置

                <properties>
                  <testng.congig>${selenium.suite}</testng.congig>
                  <aspectj.version>1.7.4</aspectj.version>
                  <allure.version>1.4.3</allure.version>
                </properties>

              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.14</version>
                <configuration>
                    <testFailureIgnore>false</testFailureIgnore>
                    <argLine>
                        -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                    </argLine>
                    <suiteXmlFiles>
                        <suiteXmlFile>target\test-classes\${testng.congig}</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <dependency>
              <groupId>ru.yandex.qatools.allure</groupId>
              <artifactId>allure-testng-adaptor</artifactId>
              <version>${allure.version}</version>
           </dependency>

           <reporting>
             <excludeDefaults>false</excludeDefaults>
             <plugins>
              <plugin>
                 <groupId>ru.yandex.qatools.allure</groupId>
                 <artifactId>allure-maven-plugin</artifactId>
                 <version>{latest.version}</version>
               </plugin>
             </plugins>
           </reporting>
Run Code Online (Sandbox Code Playgroud)

testng selenium maven allure

2
推荐指数
1
解决办法
3217
查看次数

标签 统计

allure ×1

azure ×1

d3.js ×1

javascript ×1

json ×1

maven ×1

selenium ×1

testng ×1